Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> conditional cursor that will start fetching data from where it stopped in last execution

conditional cursor that will start fetching data from where it stopped in last execution

From: <garfield.jack_at_gmail.com>
Date: 24 Nov 2006 06:08:45 -0800
Message-ID: <1164377325.079290.138090@l12g2000cwl.googlegroups.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US