日期:2014-05-17 浏览次数:21088 次
declare
v1 varchar2(10);
v2 varchar2(10);
begin
for a in (select t.id, regexp_replace(t.xm, '\^1V6
------解决方案--------------------
V6', ',') xm from tb1 t) loop
for b in (select regexp_substr(a.xm, '[^,]+', 1, level) xm
from dual
connect by level <= regexp_count(a.xm, ',')) loop
--dbms_output.put_line(b.xm);
select t.key into v1 from tb2 t where t.pas = b.xm;
v2 := v2
------解决方案--------------------
v1;
--dbms_output.put_line(v2);
end loop;
update tb1 set tb1.xm = v2 where tb1.id = a.id;
v2 := '';
end loop;
commit;
end;