表名 select a.imarkno, substr(b. 字段 b,INSTR(b. 字段 b,',',1,1)+1,INSTR(b. 字段 b,',',1,2)-INSTR(b. 字段 b,',',1,1)-1), substr(b. 字" name="description" />

很有用的oracle 函数

发表于:2007-05-25来源:作者:点击数: 标签:oracle很有用的InsertINTO
insert into MI LY: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">表名 select a.imarkno, substr(b. 字段 b,INSTR(b. 字段 b,',',1,1)+1,INSTR(b. 字段 b,',',1,2)-INSTR(b. 字段 b,',',1,1)-1), substr(b. 字

insert into MILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">表名

select a.imarkno,

substr(b.字段b,INSTR(b.字段b,',',1,1)+1,INSTR(b.字段b,',',1,2)-INSTR(b.字段b,',',1,1)-1),

substr(b.字段b,INSTR(b.字段b,',',1,2)+1,INSTR(b.字段b,',',1,3)-INSTR(b.字段b,',',1,2)-1),

substr(b.字段b,INSTR(b.字段b,',',1,3)+1,INSTR(b.字段b,',',1,4)-INSTR(b.字段b,',',1,3)-1),

b.wangzhanlx,

substr(b.domainname,INSTR(b.domainname,',',1,1)+1,INSTR(b.domainname,',',1,2)-INSTR(b.domainname,',',1,1)-1),

substr(b.domainname,INSTR(b.domainname,',',1,2)+1,INSTR(b.domainname,',',1,3)-INSTR(b.domainname,',',1,2)-1),

substr(b.domainname,INSTR(b.domainname,',',1,3)+1,INSTR(b.domainname,',',1,4)-INSTR(b.domainname,',',1,3)-1),

c.glsj,

c.glbp,

'ywtxdz'

from wzba_identifier a,wzba_mingchengfb b,wzba_beianfb c

where a.iba_id=b.mc_id and a.iba_id=c.ba_id;

 

INSTR(<c1>,<c2>[,<i>[,<j>]]) c1中从位置i开始查找c2c1中出第j次的位置,i可以为负(此时,从c1的尾部开始)

原文转自:http://www.ltesting.net