Can anyone give the syntax of Merge?

Showing Answers 1 - 3 of 3 Answers

dev

  • Sep 18th, 2006
 

Sorry, about the question

my question is:

What is the Syntax of Merging(UPSERT)?

  Was this answer useful?  Yes

mamathi

  • Oct 11th, 2006
 

MERGE INTO DestinationTable
     USING SourceTable
          ON SourceTable.ColumnX = DestinationTable.ColumnX
WHEN MATCHED THEN
     UPDATE ColumnY = SourceTable.ColumnY
WHEN NOT MATCHED THEN
     INSERT VALUES(SourceTable.ColumnX, SourceTable.ColumnY)

 

try this and let me know.

  Was this answer useful?  Yes

dev

  • Oct 17th, 2006
 

Thank u mamathi.

developer

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions