<?xml version="1.0" encoding="gb2312"?>
<?xml-stylesheet href="http://blog.itpub.net//styles/rss.css" type="text/css"?>

<rdf:RDF 
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
  xmlns="http://my.netscape.com/rdf/simple/0.9/"
>
    
     <channel>
  <title>atgc的博客</title>
  <link>http://atgc.itpub.net</link>
  <description></description>
 </channel>
    <item>
<title>Oracle保存图片到表</title>
<description>E:photo&gt;dir Volume in drive E is New Volume Volume Serial Number is F816-C39F Directory of E:photo2007-10-31 11:00 &lt;DIR&gt; .2007-10-31 11:00 &lt;DIR&gt; ..2007-08-13 16:19 1,212,681 flower.jpg 1 File(s) 1,212,681 bytes 2 Dir(s) 40,406,614,016 bytes free----------------------------------------------------SQL&gt; conn a/aConnected.grant create any directory to a;grant create any library to a;create or replace directory photo_dir as 'e:photo';create table photos (blob_column blob);declare a_blob blob; a_bfile...</description>
<link>http://atgc.itpub.net/post/22412/409915</link>
<pubDate>Wed,31 10 2007 11:21:39</pubDate>
</item>
<item>
<title>用B表的数据更新A表的数据</title>
<description>create table table_a(id number(5),name varchar2(10),score number(2));insert into table_a values(1,'aa',10);insert into table_a values(2,'bb',10);insert into table_a values(3,'cc',10);insert into table_a values(4,'dd',10);create table table_b(id number(5) unique,name varchar2(10),score number(2),batch_id number(10));insert into table_b values(1,'xx',90,1);insert into table_b values(2,'yy',80,1);insert into table_b values(3,'zz',60,2);insert into table_b values(4,'mm',70,2);commit;create bitmap in...</description>
<link>http://atgc.itpub.net/post/22412/408331</link>
<pubDate>Sat,27 10 2007 14:32:26</pubDate>
</item>
<item>
<title>准确地判断字段是否含有汉字或者提取汉字等 </title>
<description>写一函数，准确地判断字段是否含有汉字或者提取汉字等 从表里提取汉字, 需要考虑字符集, 不同的字符集汉字的编码有所不同这里以GB2312为例, 写一函数准确地从表里提取简体汉字.假设数据库字符集编码是GB2312, 环境变量(注册表或其它)的字符集也是GB2312编码并且保存到表里的汉字也都是GB2312编码的那么也就是汉字是双字节的，且简体汉字的编码范围是B0A1 - F7FE换算成10进制就是B0 A1 F7 FE176,161 - 247,254我们先看一下asciistr函数的定义Non-ASCII characters are converted to the form xxxx, where xxxx represents a UTF-16 code un...</description>
<link>http://atgc.itpub.net/post/22412/392631</link>
<pubDate>Wed,05 09 2007 19:22:41</pubDate>
</item>
<item>
<title>自定义函数返回多个值</title>
<description>说明一点，带out参数的字定义函数不能用于 SQL语句，只能在PL/SQL程序里如下例子，返回两个3个数字set serveroutput ondeclare v_1 number; v_2 number; v_3 number; function my_f(p_1 in number,p_2 out number,p_3 out number) return number as v_id number(10):=p_1; begin p_2 := 200; p_3 := 300; return v_id; end;begin v_1:=my_f(100,v_2,v_3); dbms_output.put_line('v_1 is '||v_1); dbms_output.put_line('p_2 is '||v_2); dbms_output.put_line('p_3 is '||v_3);end;/v_1 is 100p_2 is 200p_3 is 300PL/SQL procedure succe...</description>
<link>http://atgc.itpub.net/post/22412/391788</link>
<pubDate>Tue,04 09 2007 14:31:13</pubDate>
</item>
<item>
<title>Oracle Bug 4458790 06502: PL/SQL: numeric or value error: character string buffer too small</title>
<description>Oralce的一些版本，当在函数里执行了min/max操作，并且这个min/MAX的参数是一个char型的字段将出错，这是一个BUG,BUG号Bug 4458790 我测试了win的9.2.0.7没有问题，但是10.2.0.1由问题SQL&gt; select * from v$version;BANNER----------------------------------------------------------------Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - ProdPL/SQL Release 10.2.0.1.0 - ProductionCORE 10.2.0.1.0 ProductionTNS for 32-bit Windows: Version 10.2.0.1.0 - ProductionNLSRTL Version 10.2.0.1.0 - Production5 rows se...</description>
<link>http://atgc.itpub.net/post/22412/389787</link>
<pubDate>Thu,30 08 2007 19:09:03</pubDate>
</item>
<item>
<title>多行转多列，行数和列数不确定</title>
<description>原始需求，有2表如下SQL&gt; select * from mas;TO TOOLNAME-- ----------01 包裹02 信函03 挂号信04 中国速递05 EMS06 DHL6 rows selected.SQL&gt; select * from putdt;SENDDT TO GNAME ST CITY-------- -- ---------- -- ----20070101 01 john 12 256620070101 04 david 16 309820070101 05 apple 18 209820070201 04 apple 16 307820070304 05 poly 13 100120070304 04 john 12 256620070101 01 james 12 88007 rows selected.要求输出如下格式的报表senddt toolid1 sum1 toolid2 sum2 toolid3 sum3 toolid4 sum4 toolid5 sum520070101 01 1...</description>
<link>http://atgc.itpub.net/post/22412/387737</link>
<pubDate>Sat,25 08 2007 14:57:05</pubDate>
</item>
<item>
<title>oci连接Oracle</title>
<description>import java.io.*;import java.text.*;import java.lang.String;import java.util.*;import java.lang.*;import java.io.FileOutputStream;import java.sql.*;import oracle.sql.*;import oracle.jdbc.driver.*;public class zhu{ public static void main(String[] args) throws Exception { String sql = &quot;select id from table where rownum&lt;=20&quot;; String fields = &quot;&quot;; DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); Connection conn = DriverManager.getConnection(&quot;jdbc:oracle:oci:@连接名&quot;,&quot;user&quot;,&quot;pass&quot;...</description>
<link>http://atgc.itpub.net/post/22412/333514</link>
<pubDate>Wed,08 08 2007 10:47:14</pubDate>
</item>
<item>
<title>from asktom</title>
<description>and we said...There are at least 2 ways to perform this sort of co-related update correctly. I'll show 
my preferred method (update a join) and then another method that'll work if you cannot 
put a unique constraint on LOOKUP(keyname) (which is needed for the join update).


Here are the test tables:

scott@ORA734.WORLD&gt; create table name
 2 ( keyname int,
 3 columnName varchar2(25)
 4 )
 5 /
Table created.

scott@ORA734.WORLD&gt; create table lookup
 2 ( keyname int PRIMARY KEY,
 3...</description>
<link>http://atgc.itpub.net/post/22412/307543</link>
<pubDate>Fri,13 07 2007 10:51:11</pubDate>
</item>
<item>
<title>rac</title>
<description>参考文档http://download-west.oracle.com/doc...g.htm#NETAG0153假设存在2 instance sales1 and sales2 数据库 salesclient 设置sales.us.acme.com= (DESCRIPTION= (LOAD_BALANCE=on)(FAILOVER=on)(ADDRESS=(PROTOCOL=tcp)(HOST=sales1-server)(PORT=1521))(ADDRESS=(PROTOCOL=tcp)(HOST=sales2-server)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=sales.us.acme.com)))sales1 上 tnsnames.ora内容listener_sales2= (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=sales2-server)(PORT=1521)))sales1 上spfile内容REMOTE_LISTENER=listener_s...</description>
<link>http://atgc.itpub.net/post/22412/306376</link>
<pubDate>Tue,10 07 2007 17:05:38</pubDate>
</item>
<item>
<title>MySQL存储过程中的动态SQL</title>
<description>MySQL版本5.0.13以上create table aa (id int);delimiter //create procedure test(v_sql varchar(200))beginset @sqltext:=concat('insert into aa ',v_sql);prepare stmt from @sqltext;execute stmt;DEALLOCATE PREPARE stmt;end;//call test('values (1)')//</description>
<link>http://atgc.itpub.net/post/22412/304656</link>
<pubDate>Fri,06 07 2007 16:20:08</pubDate>
</item>
 </rdf:RDF>


