| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> conditional cursor that will start fetching data from where it stopped in last execution
Hi All,
Let me detail you the problem first.
I have two tables 'a' and 'b'.
Suppose from somewhere data gets inserted into table 'a'.
Now this data has to be copied from table 'a' and then inserted into
table 'b'.
We have defined a column in table 'a' which generates a unique column
id everytime a new row is created.
To copy data from table 'a' to table 'b', we have defined a cursor
which will copy data form 'a' and then insert into 'b'.
Now the problem statement:
Can anybody tell me if a cursor can be defined in such a way that it
will copy only the newly inserted data into table 'a' else otherwise,
everytime the procedure using this cursor, is executed then the cursor
will copy all the rows and insert into the other table. This will add
additional overhead on the server..which is really not desirable. Can
this cursor start from the unique column id where it stopped last time
when no further records were there?
It will be really helpful for me if somebody, who has previously encountered a similar problem, can provide me with some script.
Thanks & Regards. Received on Fri Nov 24 2006 - 08:08:45 CST
![]() |
![]() |