-
-
Notifications
You must be signed in to change notification settings - Fork 318
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
BullkMerge: The MERGE statement attempted to UPDATE or DELETE the same row more than once. #743
Comments
Hello @nuqlium , This error happens when the source has multiple entities with the same key values. You need to use the Example: https://dotnetfiddle.net/DoD5hE Best Regards, Jon |
Hi Jon, Thank you for the feedback, appreciate the time. I don't think the source has the same key. ["³","3"] One is effectively superscript and one is normal. Is there an option within BulkMerge to treat these values separately? (Edit: This is why I don't think AllowDuplicateKeys is the answer, as they're not duplicates and if I set that value=true, then I may end up with two entries for the same key which are actually different keys - I think!) The field they go into is an NVARCHAR which supports these characters. Thank you again for your assistance, Dev |
Hello @nuqlium , Do you think you could create a runnable project with the issue? It doesn’t need to be your project, just a new solution with the minimum code to reproduce the issue. You can send it in private here: [email protected] Perhaps we are missing something, as we don't fully see the current code. SQL Server should already treat those numbers/characters differently since as you said, there have different unicode values. |
Hi Jonathan,
Thank you for coming back to me.
I’ll prepare something soon and come back to you,
Kind Regards,
Dev
Dev Day, Nuqlium, Paraspar | t: 0208 078 8700 | e: ***@***.******@***.***>
The information contained in this e-mail and its attachments is confidential.
Please do not disclose to anyone for whom it is not intended without Paraspar's consent.
From: Jonathan Magnan ***@***.***>
Sent: 08 November 2022 17:24
To: zzzprojects/EntityFramework-Plus ***@***.***>
Cc: Dev Day ***@***.***>; Mention ***@***.***>
Subject: Re: [zzzprojects/EntityFramework-Plus] BullkMerge: The MERGE statement attempted to UPDATE or DELETE the same row more than once. (Issue #743)
Hello @nuqlium<https://github.com/nuqlium> ,
Do you think you could create a runnable project with the issue? It doesn’t need to be your project, just a new solution with the minimum code to reproduce the issue. You can send it in private here: ***@***.******@***.***>
Perhaps we are missing something, as we don't fully see the current code.
SQL Server should already treat those numbers/characters differently since as you said, there have different unicode values.
—
Reply to this email directly, view it on GitHub<#743 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A27VESOV6V3PORTMF2KOVX3WHKEE3ANCNFSM6AAAAAARYPYCJA>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
Hello @nuqlium, Since our last conversation, we haven't heard from you. Let me know if you need further assistance. Best regards, Jon |
Hi Jon,
Thanks for following up.
The team are just preparing a standalone project for the demo.
Just a busy time of the year with ecommerce at the moment.
Appreciate your patience,
Kind Regards,
Dev
Dev Day, Nuqlium, Paraspar | t: 0208 078 8700 | e: ***@***.******@***.***>
The information contained in this e-mail and its attachments is confidential.
Please do not disclose to anyone for whom it is not intended without Paraspar's consent.
From: Jonathan Magnan ***@***.***>
Sent: 23 November 2022 14:01
To: zzzprojects/EntityFramework-Plus ***@***.***>
Cc: Dev Day ***@***.***>; Mention ***@***.***>
Subject: Re: [zzzprojects/EntityFramework-Plus] BullkMerge: The MERGE statement attempted to UPDATE or DELETE the same row more than once. (Issue #743)
Hello @nuqlium<https://github.com/nuqlium>,
Since our last conversation, we haven't heard from you.
Let me know if you need further assistance.
Best regards,
Jon
—
Reply to this email directly, view it on GitHub<#743 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A27VESNDRZGSAKZT3PFO2ZDWJYPSDANCNFSM6AAAAAARYPYCJA>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
Hello again, A simple reminder that we are here to assist you. Don't hesitate to contact us if you need anything. Best regards, Jon |
Hello again, Since our last conversation, we haven't heard from you. Did your team find the time to create a project for this issue? Let me know if you need further assistance. Best regards, Jon |
Hi Jon,
Not yet, but we’re hoping to use the Christmas holiday period to run a small project with this example.
Hopefully, I’ll have something with you soon,
Thank you for checking in,
Kind Regards,
Dev
Dev Day, Nuqlium, Paraspar | t: 0208 078 8700 | e: ***@***.******@***.***>
The information contained in this e-mail and its attachments is confidential.
Please do not disclose to anyone for whom it is not intended without Paraspar's consent.
From: Jonathan Magnan ***@***.***>
Sent: 19 December 2022 16:01
To: zzzprojects/EntityFramework-Plus ***@***.***>
Cc: Dev Day ***@***.***>; Mention ***@***.***>
Subject: Re: [zzzprojects/EntityFramework-Plus] BullkMerge: The MERGE statement attempted to UPDATE or DELETE the same row more than once. (Issue #743)
Hello again,
Since our last conversation, we haven't heard from you.
Did your team find the time to create a project for this issue?
Let me know if you need further assistance.
Best regards,
Jon
—
Reply to this email directly, view it on GitHub<#743 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A27VESIOFCZCQVV4JCFJNQ3WOCBC3ANCNFSM6AAAAAARYPYCJA>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
Hello again! Let me know if you need further assistance. Best regards, Jon |
Thanks Jon,
We will do!
Apologies for the delay, Q4 is typically a very busy time.
But we are still getting the error with unique keys, so I hope to create a project soon to share with you.
Kind Regards,
Dev
Dev Day, Nuqlium, Paraspar | t: 0208 078 8700 | e: ***@***.******@***.***>
The information contained in this e-mail and its attachments is confidential.
Please do not disclose to anyone for whom it is not intended without Paraspar's consent.
From: Jonathan Magnan ***@***.***>
Sent: 09 January 2023 15:16
To: zzzprojects/EntityFramework-Plus ***@***.***>
Cc: Dev Day ***@***.***>; Mention ***@***.***>
Subject: Re: [zzzprojects/EntityFramework-Plus] BullkMerge: The MERGE statement attempted to UPDATE or DELETE the same row more than once. (Issue #743)
Hello again!
Let me know if you need further assistance.
Best regards,
Jon
—
Reply to this email directly, view it on GitHub<#743 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A27VESKVDMBFAL26RCYK3G3WRQTS7ANCNFSM6AAAAAARYPYCJA>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
Hi,
There is an error when doing a bulkMerge.
========
System.Data.SqlClient.SqlException (0x80131904): The MERGE statement attempted to UPDATE or DELETE the same row more than once. This happens when a target row matches more than one source row. A MERGE statement cannot UPDATE/DELETE the same row of the target table multiple times. Refine the ON clause to ensure a target row matches at most one source row, or use the GROUP BY clause to group the source rows.
Capturing the values, would the first item which looks like superscript and the normal "3" cause the package to treat them the same way and thus think we have duplicate keys? Is there a way around this.
["³","3","womans coat","m","0m3p4kvt-1"]
Any help would be greatly appreciated.
Thank you,
Dev
The text was updated successfully, but these errors were encountered: