title: UPDATE INNER JOIN in Toad
body: <p>Note, this is not a duplicate question.</p>
  
  <p>I have a statement I need to run in Toad. I know how to write it as an inner join update statement but Toad does not allow for inner joins in an UPDATE statement. If I write it as a SELECT statement, it works. But when I rewrite it as an UPDATE statement, Toad will not accept it. How do I write this so Toad will accept it? </p>
  
  <pre><code>UPDATE C INNER JOIN D
  ON C.SYSTEM = D.SYSTEM
  SET C.REF_CD = D.CODE,
      C.REF_DT = TO_DATE('12/05/2017', 'MM/DD/YYYY')
  WHERE C.CODE = '123'
  AND D.CODE IS NOT NULL
  AND C.CLOSED = 'N'
  AND C.RCVD_DT &gt;= TO_DATE('12/01/2017', 'MM/DD/YYYY')
  AND C.RCVD_DT &lt;= TO_DATE('12/04/2017', 'MM/DD/YYYY')
  AND SUBSTR(C.SSN,7,3) &gt;= D.FROM
  AND SUBSTR(C.SSN,7,3) &lt;= D.TO;
  </code></pre>
  
  <p>I have now also tried to write this as a Merge statement (which Toad allows for):</p>
  
  <pre><code>MERGE INTO C
  USING D
  ON (C.SYSTEM = D.SYSTEM)
  WHEN MATCHED THEN
  UPDATE SET C.REF_CD = D.CODE,
             C.REF_DT = TO_DATE('12/05/2017', 'MM/DD/YYYY')
     WHERE C.CODE = '123'
     AND D.CODE IS NOT NULL
     AND C.CLOSED = 'N'
     AND C.RCVD_DT &gt;= TO_DATE('12/01/2017', 'MM/DD/YYYY')
     AND C.RCVD_DT &lt;= TO_DATE('12/04/2017', 'MM/DD/YYYY')
     AND SUBSTR(C.SSN,7,3) &gt;= D.FROM
     AND SUBSTR(C.SSN,7,3) &lt;= D.TO;
  </code></pre>
  
  <p>This gives me a new error because system matches on multiple rows. However, it is the only matching field that I can join on.</p>