create or replace procedure p_repaire_data_route_nbr is
cnt number(7) :=0;
begin
for cl in (select a.*,rowid from KXD_TMP_ERRNBR a where servnumber like '1064%' and flag is null) loop
for cl2 in (select * from subs_telnum t where value = cl.servnumber and t.expiretime> sysdate) loop
update v_repaire_data_route_nbr set data_nodeid=cl.CUST where servnumber = cl.servnumber and starttime=cl2.availtime;
end loop;
update KXD_TMP_ERRNBR a set a.flag=1
where rowid=cl.rowid;
cnt :=cnt+1;
if(mod(cnt,100) =0) then
commit;
dbms_lock.sleep(120);
end if;
end loop;
commit;
end p_repaire_data_route_nbr;
cnt number(7) :=0;
begin
for cl in (select a.*,rowid from KXD_TMP_ERRNBR a where servnumber like '1064%' and flag is null) loop
for cl2 in (select * from subs_telnum t where value = cl.servnumber and t.expiretime> sysdate) loop
update v_repaire_data_route_nbr set data_nodeid=cl.CUST where servnumber = cl.servnumber and starttime=cl2.availtime;
end loop;
update KXD_TMP_ERRNBR a set a.flag=1
where rowid=cl.rowid;
cnt :=cnt+1;
if(mod(cnt,100) =0) then
commit;
dbms_lock.sleep(120);
end if;
end loop;
commit;
end p_repaire_data_route_nbr;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29446986/viewspace-1764994/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29446986/viewspace-1764994/