Reputation: 21
I am trying to make a merge between table1 and table2, and I am sure that the table2 is returning unique elements, but I am getting the below error in Sybase.
Msg451, Merge is not allowed because different merge actions are referenced in the same WHEN [NOT] MATCHED clause.
Merge Into table1 as G using (tableB) as D on G.id = D.id When MATCHED then updated set ... when not MATCHED then insert ...
Upvotes: 0
Views: 456
Reputation: 2378
The current ASE implementation of MERGE indeed has some limitations, as the error message says. Unfortunately these do not seem to be documented.
Upvotes: 0