leonardoavs
leonardoavs

Reputation: 21

Sybase Merge is not allowed because different merge actions are referenced in the same WHEN [NOT] MATCHED clause

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

Answers (1)

RobV
RobV

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

Related Questions