What is the more effective way to implement bulk update from a collection? I implemented the insert with SqlBulkCopy but how can I implement Bulk Update?
Thanks
What is the more effective way to implement bulk update from a collection? I implemented the insert with SqlBulkCopy but how can I implement Bulk Update?
Thanks
There is no such thing as a 'bulk update' - all update statements in SQL run 'in bulk'.
You would just use SqlBulkInsert as you have to insert to a staging table, then run the update from there, like
UPDATE [live]
SET [SomeColumn] = [staging].[SomeColumn]
FROM [dbo].[TheTable] live
INNER JOIN [dbo].[TheTableStaging] staging
ON live.[SomeKey] = staging.[SomeKey]