Folks,

Ooops!  Let me correct that example:

 UPDATE invoice SET invoice_total = total_of_items
 FROM (SELECT invoice_id, sum(item_amount) AS total_of_items
        FROM invoice_items) iit
 WHERE iit.invoice_id = invoices.id;

Sorry to lead people astray.

-Josh

______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      [EMAIL PROTECTED]
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to