Error: Executing the query declare @COUNTS table([ACTION] varchar(28), [INSER..." failed with the following error: "The MERGE statement attempted to UPDATE or DELETE the same row more than once - when refreshing the datamart"

Datamart refresh fails on BBDW_FACT_EVENTREGISTRANT with the following error message:

Description: Executing the query "declare @COUNTS table([ACTION] varchar(28), [INSER..." failed with the following error: "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.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

Download and install the latest patch, which contains all fixes from previous patches. If you are running an older version, download and install the latest version and then the patch. 

Environment

 2.94.1524
 2.94.1524, patch 75 ; 3.0.516, patch 14

Was this article helpful?