Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Using Merge Update and Insert One table to another

$
0
0

Hi, 

I have a source and destination table. Using merge statement i want to update and insert all data only specific columns from source to destination. 

For Example 

Source Table:          Destination Table

Id    Type                  Id  Name  Number Data

1      S                     

2      U

3       U                     

4       S

If Type =' U' Then i need to update and insert all data from source to destination. How can i do this?





Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>