Is there a way to bulk upsert in SQL Server 2005? Something akin to 2008’s MERGE would be perfect. I have one table working as a temp workspace that will need to be reconciled to the main table on session complete. In 2008, merge would do great for this, but the only 2005 methods I’ve seen are for individual upserts, not bulk. Ideas?
Share
First do an update and then do the insert. Something like this.
Update:
If you have more than one column in the primary key you can use
not existsinstead.