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
An error is reported during batch update: "The MERGE statement attempted to update or delete the same row multiple times. This situation occurs when the target row matches multiple source rows."
#1644
Open
LadyKiller1025 opened this issue
Dec 18, 2024
· 2 comments
Hi, Can you use Translate and update this into English.
When the BulkUpdateAsync method is called, an error message "The MERGE statement attempted to update or delete the same row multiple times. This situation occurs when the target row matches multiple source rows" is prompted. After checking, it is said that when using the MERGE statement, this error occurs because the conditions in the ON clause make a certain row in the target table match multiple rows in the source table, and the MERGE statement does not allow multiple updates or deletions on the same row of the target table. However, I don't know what this ON condition is and how to check which matches in the source table result in multiple rows.
LadyKiller1025
changed the title
批量更新报错“MERGE 语句试图多次更新或删除同一行。目标行与多个源行匹配时会出现这种情况 ”?
An error is reported during batch update: "The MERGE statement attempted to update or delete the same row multiple times. This situation occurs when the target row matches multiple source rows."
Dec 23, 2024
调用BulkUpdateAsync方法时提示"MERGE 语句试图多次更新或删除同一行。目标行与多个源行匹配时会出现这种情况"错误,查了下说是当使用 MERGE 语句时,出现此错误是因为 ON 子句的条件使得目标表中的某一行与源表中的多行相匹配,而 MERGE 语句不允许对目标表的同一行进行多次更新或删除操作。 但是我不知道这个on条件是什么,以及如何排查源表中哪些匹配出了多行,有大佬知道吗?
The text was updated successfully, but these errors were encountered: