Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Help: PL/SQL insert and delete
We need to develop a PL/SQL of aging an table. What I do is
cursor x is select * from table A where polltime < sysdate-1;
Begin
FOR y in x LOOP
insert into table B values (col1 y.col1,col2 y.col2);
delete from table A where col1=y.col1;
END LOOP;
END;
The problem is, sometimes, insert did not finish, while delete still can go
on, cause loss some data, how can we improve the PL/SQL?
Thank you for your help.
Received on Thu May 24 2001 - 20:53:07 CDT