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 -> Re: conditional cursor that will start fetching data from where it stopped in last execution

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

From: sandeep <hyd.sandeep_at_gmail.com>
Date: 26 Nov 2006 20:48:47 -0800
Message-ID: <1164602926.973790.112160@45g2000cws.googlegroups.com>


Will the below not be useful for you??

where id not in (SElect id from table2)

Regards
- Sandeep
garfield.jack_at_gmail.com wrote:
> 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 Sun Nov 26 2006 - 22:48:47 CST

Original text of this message

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