Run update or insert query after select query in SQL Server 2012

Posted by Soujanyabargavi under Sql Server on 8/23/2018 | Points: 10 | Views : 373 | Status : [Member] | Replies : 0
I have a large data feed each morning that is dumped into a SQL Server table with a truncate query.

I need to update parts of my master table with any changes from this dump and append any new rows (basically the rest) to my Master table also from this dump.

To reduce the run time this truncate query is about SQL server to be modified to cover only the last 2 years.

How should I go about do this

Both tables have identical structure so hopefully this should be fairly straight forward.




Responses

(No response found.)

Login to post response