title: Update a table that I am sub-selecting from
body: <p>Why do I get the following error when I try to update the a_fees table? From what I can gather, you can not base the sub-selection criteria on a table that is being updated? Is it because SQL is read backwards? How can I get around this?</p>
  
  <p><strong>Error Message: 1093 - You can't specify target table 'a_fees' for update in FROM clause</strong></p>
  
  <pre><code>UPDATE a_fees
  SET active = 'N'
  WHERE a_fees.fee_id IN
  (
  SELECT fee_id
  FROM a_fees
  WHERE verified = 'N'
  HAVING audit_fees + audit_related_fees + tax_fees + other_fees &lt; 5000);
  </code></pre>