Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 710522E0035 for ; Wed, 21 Nov 2007 23:41:57 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 27551-10 for ; Wed, 21 Nov 2007 23:41:49 -0400 (AST) Received: from web54304.mail.re2.yahoo.com (web54304.mail.re2.yahoo.com [206.190.49.114]) by postgresql.org (Postfix) with SMTP id 87E702E0033 for ; Wed, 21 Nov 2007 23:41:56 -0400 (AST) Received: (qmail 38661 invoked by uid 60001); 22 Nov 2007 03:41:54 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=DDC8Gbqog5QWkndrz7wNXcqVnn9DND3JCCfBPgk79OnQTfuoS3k8GhQjUSFP8GQ4jk+qJO/1iMqBZQtfZKk3jP7lIXTGNBAFUX1NtZJ7ZyWkaBbeMA6o5CE3QigfVcwFLlt6mX9HdSsgQwx9hZKjOkwkoAEs3iBFv/i0/u+ToRE=; X-YMail-OSG: K1ec2skVM1lzQcOhiD9AWgKBs3tAYv84t39srYYQstzISQinNIAdt_FMB2mzun01e3QBecnxUH_auvQMCavil6ffoo4xK65A1wYM4vdN5EfDeseAQYG8ZHlhL.WkcfqXJv.94B9z7WCaMQ-- Received: from [203.113.17.177] by web54304.mail.re2.yahoo.com via HTTP; Wed, 21 Nov 2007 19:41:54 PST Date: Wed, 21 Nov 2007 19:41:54 -0800 (PST) From: chester c young Subject: Re: update on join ? To: Andreas Cc: sql pgsql In-Reply-To: <4744F06A.8080302@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <169536.38344.qm@web54304.mail.re2.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/108 X-Sequence-Number: 29636 > I tried > > UPDATE things JOIN inventory ON things.thing_id = inventory.thing_fk > SET number = 0 > WHERE color = 'red' > use the cool "from" clause in the update update things t set number = 0 from inventory i where t.thing_id = i.thing_fk and i.color = 'red'; ____________________________________________________________________________________ Get easy, one-click access to your favorites. Make Yahoo! your homepage. http://www.yahoo.com/r/hs