You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of now we can bulk copy data from one db system to sql server. But in this approach, the process fails if a primary key constraint is violated. There is no option to implement upsert kind of operation in the current setup.
Preferred solution
It would be cool if the SQLServerBulkCopyOptions has a parameter like updateIfExists. Using this parameter, users can choose whether to fail the bulk copy or proceed with updating the rows.
The text was updated successfully, but these errors were encountered:
Hi @pkgajulapalli ,
Apologies for the delay, I got carried away with other features and this issue escaped my attention.
Looks like there is no way achieving this using SQL Server bulk load feature. The only close alternative would be using temporary tables and merge command, which would be almost a new feature separate from bulk copy from driver point of view.
Support for UPSERT operations using BulkCopy
As of now we can bulk copy data from one db system to sql server. But in this approach, the process fails if a primary key constraint is violated. There is no option to implement upsert kind of operation in the current setup.
Preferred solution
It would be cool if the
SQLServerBulkCopyOptions
has a parameter likeupdateIfExists
. Using this parameter, users can choose whether to fail the bulk copy or proceed with updating the rows.The text was updated successfully, but these errors were encountered: