This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Oracle merge same table

 
Atul Mishra
Ranch Hand
Posts: 140
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

All, is it possible to use Oracle merge query within the same table.
Case is

1. Select if input.x and input.y combination exists in Table A
2. If a row exists update column C in Table A with inout.Z
3. If row doesnt exist insert the row

Can anyone provide me how to do this using merge ?

I wrote a procs to do this but believe a merge can handle it

Thanks
 
Atul Mishra
Ranch Hand
Posts: 140
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
could anyone please help

Thanks
Atul
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33696
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you know how to merge two different tables into one? If so, you know the syntax and are all set up to try it and find out.
 
Vamsi Mohan
Ranch Hand
Posts: 80
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use "insert with select" query to merge the records.
 
Atul Mishra
Ranch Hand
Posts: 140
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am afraid I may need a little more help.
I have only done merge query which merges two tables.

Thankyou
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic