I want to know what is MERGE statement in SQL Server.
Thank you.
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted Jul 19, 2012, 3:13 AM EDT
Rahul Bhatt165 reputationPosted Jul 19, 2012, 3:22 AM EDT
make your query as following way
select CAST(FieldName1 as varchar)+' - ' + CAST(FieldName2 as varchar) from TableName
Vikrant MoreRank #1,157 · 1.6K reputationPosted Jul 24, 2012, 12:16 AM EDT
here is the article i found which helps you to know what is MERGE Statement in SQL Server.
http://blog.sqlauthority.com/2008/08/28/sql-server-2008-introduction-to-merge-statement-one-statement-for-insert-update-delete/
Jignesh TrivediRank #16 · 50.3K reputationPosted Jul 24, 2012, 1:25 AM EDT
Hi,
Merge enable us to performs insert, update, or delete operations on a target table based on the results of a join with a source table. In other word it provides an efficient way to perform multiple DML operations base on condition.
please refer
http://technet.microsoft.com/en-us/library/bb510625.aspx
http://www.mssqltips.com/sqlservertip/1704/using-merge-in-sql-server-to-insert-update-and-delete-at-the-same-time/
hope this will help you.