title: Teradata MERGE with DELETE and INSERT - syntax?
body: <p>I have been trying to find the correct syntax for the following case (if it is possible?):</p>
  
  <pre><code>MERGE INTO TAB_A tgt
  USING TAB_B src ON (src.F1 = tgt.F1 AND src.F2 = tgt.F2
  WHEN MATCHED THEN DELETE
  ELSE INSERT (tgt.*) VALUES (src.*)
  </code></pre>
  
  <p>Background: the temp table contains a fix for the target table, as in it contains two types of rows:
  the incorrect rows that are to be removed (they match with rows in the target table), and the 'corrected' row that should be inserted (it replaces all the 'delete' rows).</p>
  
  <p>So essentially: remove anything that matches;
  insert anything that does not match.</p>
  
  <p>the current error I am getting is:</p>
  
  <p>"Syntax error: expected something between the 'DELETE' keyword and the 'ELSE' keyword"</p>
  
  <p>Any help appreciated, thanks!</p>