update and insert
Posted: Tue May 12, 2009 8:48 am
Hi,
I have a requirement where I want to update the existing records to 'close' which has a status 'open' and I also want to add a new record for the same key with status 'open' and current timestamp. I am using oracle stage.
So if there are 5 open records then I should have 10 records in the output with one as closed and other as open for each one.
if I use update then insert in upsert mode its either updating and if it fails then it inserts. I am trying to design two jobs one for insert and another for update. Dont know if there is any other option ....
Can anyone suggest me on this .
Thanks in advance
I have a requirement where I want to update the existing records to 'close' which has a status 'open' and I also want to add a new record for the same key with status 'open' and current timestamp. I am using oracle stage.
So if there are 5 open records then I should have 10 records in the output with one as closed and other as open for each one.
if I use update then insert in upsert mode its either updating and if it fails then it inserts. I am trying to design two jobs one for insert and another for update. Dont know if there is any other option ....
Can anyone suggest me on this .
Thanks in advance