KB Issue
When merging data between tables in SQL Server, multiple rows may be sent simultaneously. This is not allowed and will cause the 'MERGE statement attempted'.
Issue Details
Whether you are running a Script in SQL Server Management Studio, or in a website running ASP Classic or ASP.NET. If your table contains multiple rows that are of the same value, this will cause your Script to receive the following error.
SQL Merge Statement Error
Msg 8672, Level 16, State 1, Line 18
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.

Recreate Issue
The following code sample will give the "MERGE statement attempted" error.
with s1 as (SELECT mt.ITTempID, COALESCE(
Resolve Issue
To correct the issue, we need to add a TOP 1 to our Main Select Statement.
In your code, add this to the Statement that wraps all other code.
with s1 as (SELECT top 1 mt.ITTempID, COALESCE(
Review this KB Article to further resolve this issue.