title: Update values on one table from another table when criteria is met
body: <p>I would like to update one table in my db depending on a value from another table.
  The 2 tables are:</p>
  
  <pre><code> QUOTES(
     QUOTE_ID,
     APPROVAL
   )
  
  PRODUCTS(
    QUOTE_ID_FK,
    LINE_APPROVAL
  )
  </code></pre>
  
  <p>I need to update all <code>PRODUCTS.LINE_APPROVAL</code> to <code>'Y'</code> where the <code>QUOTES.APPROVAL = 'Y'</code></p>
  
  <p>I have tried something like this but fails as I don't have the syntax quite right but hopefully you can see what I'm trying to achieve:</p>
  
  <pre><code>UPDATE 
      PRODUCTS
  SET 
      LINE_APPROVAL = 'Y'
  FROM
      QUOTES,
      PRODUCTS            
  WHERE
      PRODUCTS.QUOTE_ID = QUOTES.QUOTE_ID_FK
  AND
      QUOTES.APPROVAL = 'Y'
  </code></pre>
  
  <p>Any help would be appreciated.</p>