Create an option to use MERGE INTO versus insert, update, delete
It would be nice to have an option to have the results scripted for MERGE INTO instead of the insert, update, delete. This makes it more friendly to have successful "re-deploy" situations if someone has already deployed the data and the merge into script could handle it.
-
ben b commented
this is an interesting one.
I'm having to write loads of merge statements for static data in a small application. they are going to be included as post-deployment scripts in a visual studio database project.
I'm using the method below
https://blogs.msdn.microsoft.com/ssdt/2012/02/02/including-data-in-a-sql-server-database-project/
I was thinking if you could generate the MERGE using the key columns selected in Data Compare to join the source and target - and then compare all the other columns for differences?