Answer the question
In order to leave comments, you need to log in
MSSQL, is there a normal BULK UPSERT?
I switch to ms sql with mysql and suffer wildly from the INSERT ... ON DUPLICATE KEY UPDATE construct in MySQL. This is an awesomely convenient design - you specify the complete instruction for inserting records into the database and separately the fields that need to be updated if the record falls under a unique existing index in the table.
Why MSSQL does not comply with ANSI-92 standards is a separate issue. But the MERGE construct is simply terrible when you need to insert-update thousands of rows and write it - one torment.
Maybe there are some libraries for C# or some tricky implementations of bulk upsert for ms sql itself via code generation and EXEC command?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question