日期:2014-05-17 浏览次数:20744 次
create or replace procedure strcut(str varchar2)
as
type c_array is table of varchar2(10) index by binary_integer;
p number default 0;
idx number default 0;
strc varchar2(200);
ca c_array;
begin
strc:=str;
loop
p:=instr(strc,'-',1);
exit when p=0;
ca(idx):=substr(strc,1,p-1);
print(ca(idx));
idx:=idx+1;
p:=instr(strc,'
------解决方案--------------------
',1);
exit when p=0;
strc:=substr(strc,p+1,length(strc));
end loop;
end strcut;
/
call strcut('101518-销售合同评审流程 [ HTP-20130114-001 ]
------解决方案--------------------
101470-销售合同评审流程 [ HTP-20130109-001 ]');