Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Help: PL/SQL insert and delete
"> xxx wrote:
> >
> > 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.
Just for curiosity.
The syntax of your INSERT statement is illegal.
Didn't you see any error messages?
And more, what you said is not possible to be happened.
Received on Mon May 28 2001 - 08:36:21 CDT