Home Forums SQL Server 2008 T-SQL (SS2K8) Update one table rows with another table if match found RE: Update one table rows with another table if match found

  • Hi,

    The query logic is exactly what i'm looking out for, But when i ran the query the MERGE statement is throwing below 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.