Home » SQL & PL/SQL » SQL & PL/SQL » Merge with Both Update and Insert at the Same Time
Merge with Both Update and Insert at the Same Time [message #390430] Fri, 06 March 2009 05:34 Go to next message
shankhan
Messages: 28
Registered: September 2008
Location: Pakistan
Junior Member
Dear Guys,
Is it possible to use to Merge Statement such that when the Merge Condition matches then I can both Update and Insert the record in the same table.

Actually my problem is that when the record will match, I will change the "status" field of the record to inactive and Insert the same the record with active status and some new values as well.
Re: Merge with Both Update and Insert at the Same Time [message #390441 is a reply to message #390430] Fri, 06 March 2009 05:45 Go to previous message
Michel Cadot
Messages: 64107
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
No, merge is not made for this but you can easily do it with a procedure.

Regards
Michel
Previous Topic: Need Explanation & Problem in procedure (merged)
Next Topic: Updating Data
Goto Forum:
  


Current Time: Mon Dec 05 04:35:23 CST 2016

Total time taken to generate the page: 0.08845 seconds