Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f7KNixP66912 for ; Mon, 20 Aug 2001 19:44:59 -0400 (EDT) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.4.1) with HTTP id 105527; Mon, 20 Aug 2001 16:44:55 -0700 From: "Josh Berkus" Subject: Re: Simple SQL-syntax To: Cc: pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.4.1 Date: Mon, 20 Aug 2001 16:44:55 -0700 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200108/255 X-Sequence-Number: 4502 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 josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco