title: How to UPDATE one column using another column in another table? SQL Error: ORA-00933: SQL command not properly ended
body: <p>I have tried everything I can think of but couldn't solve this SQL error:</p>
  
  <blockquote>
    <p>SQL Error: ORA-00933: SQL command not properly ended</p>
  </blockquote>
  
  <p>This is Oracle SQL.</p>
  
  <pre><code>    UPDATE SALES_DATA_FAMILY_2007 A 
      SET A.POG_ID=B.POG_ID 
      FROM POG_HIERARCHY B 
      WHERE A.FAMILY_ID=B.FAMILY ;
  </code></pre>
  
  <p>One alternative I have tried is as below. Unfortunately it gives another error:
  ORA-01427: single-row subquery returns more than one row</p>
  
  <pre><code>    UPDATE SALES_DATA_FAMILY_2007 
      SET POG_ID= (SELECT POG_HIERARCHY.POG_ID FROM POG_HIERARCHY 
      WHERE SALES_DATA_FAMILY_2007.FAMILY_ID=POG_HIERARCHY.FAMILY_ID) 
      WHERE EXISTS (SELECT POG_HIERARCHY.POG_ID FROM POG_HIERARCHY 
      WHERE SALES_DATA_FAMILY_2007.FAMILY_ID=POG_HIERARCHY.FAMILY_ID) 
      ;
  </code></pre>
  
  <p>Please help!</p>