title: Sybase Merge is not allowed because different merge actions are referenced in the same WHEN [NOT] MATCHED clause
body: <p>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.</p>
  
  <p><strong>Msg451, Merge is not allowed because different merge actions are referenced in the same WHEN [NOT] MATCHED clause.</strong></p>
  
  <p>Merge Into table1 as G using (tableB) as D
  on G.id = D.id
  When MATCHED then
     updated set ...
  when not MATCHED then 
     insert ...</p>