title: Can't get "update from subquery" statement to work in Oracle SQL
body: <p>I've looked all over, but can't figure out how to update a column in a table based on subquery data when matching on a customer ID.  Here's some syntax to give an idea of what I'm trying to do:</p>
  
  <pre><code>UPDATE TableName
     SET TableName.Revenue = Z.Revenue
  FROM
  (
     SELECT
        CustomerID,
        sum(Revenue) as Revenue
     FROM
     (
        SELECT
           CustomerID,
           Revenue
        FROM
           TableA
        WHERE
           CustomerID in TableF
        UNION ALL
           SELECT
              CustomerID,
              Revenue
           FROM
              TableB
           WHERE
              CustomerID in TableF
     )
     GROUP BY
        CustomerID
  ) Z
  WHERE
     TableName.CustomerID = Z.CustomerID
  </code></pre>
  
  <p>In essence, I'm looking to update a table column if another ID column under the same table matches an ID from a subquery.  My goal is to avoid creating a whole new table from the subquery.  Any help would be appreciated.  Thanks.</p>