-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting the join indicator in BulkMerge method #68
Comments
Hello @Song-s-z , Sure that's possible. By default, the join uses the primary keys in your database or your identity column. You can customize it by choosing yourselves each column should be used as a primary key: https://bulk-operations.net/bulk-merge#merge-with-custom-key You can also add more conditions using Let me know if that answers correctly to your question or your need more help. Best Regards, Jon |
Hi Jon, I can't believe you could response me so quickly. Thanks very much! Is it correct that customizing each column like following?
btw, is there a document about MergePrimaryKeyAndFormula ? Thanks! |
Hello @Song-s-z , No that's bad as you will keep overriding the old property values. However, you can use the semicolons to specify more than one keys: bulk.AutoMapKeyName = "column1;column2;column3"; Unfortunately, not documentation is still incomplete. So documentation on some options such as Essentially, it appends the current SQL to the key on the |
It's very helpful to me, thanks very much!!! |
Hello @Song-s-z , Glad we could help! Don't hesitate to contact us with any questions or further assistance! Best regards, Jon |
Hi , to avoid the constraint issues, could I set the join indicators for BulkMerge method? just like in the following merge query, I will get some exceptions: e.g. Cannot insert duplicate key row in object 'dbo.table1' with unique index ..
Could I know the default join indicators in BulkMerge?
The text was updated successfully, but these errors were encountered: