Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 21E7C475E8D for ; Fri, 23 Aug 2002 15:57:28 -0400 (EDT) Received: from mta4.snet.net (mta4.snet.net [204.60.203.76]) by postgresql.org (Postfix) with ESMTP id 53DCE475CC7 for ; Fri, 23 Aug 2002 15:57:26 -0400 (EDT) Received: from pop.snet.net (pop.snet.net [204.60.203.72]) by mta4.snet.net (8.12.3/8.12.3/SNET-mx-1.2/D-1.1.1.1/O-1.1.1.1) with ESMTP id g7NJvC6l002068 for ; Fri, 23 Aug 2002 15:57:12 -0400 (EDT) X-Originating-IP: [64.252.95.167] X-SBCIS-MTA: [pop.snet.net] Received: from [192.168.1.83] (167.95.252.64.snet.net [64.252.95.167]) by pop.snet.net (8.12.3/8.12.3/SNET-pop-1.2/D-1.1.1.1/O-1.1.1.1) with ESMTP id g7NJvNT0025049 for ; Fri, 23 Aug 2002 15:57:24 -0400 (EDT) Subject: Re: question on UPDATE TABLE From: Wei Weng To: pgsql-sql@postgresql.org In-Reply-To: <20020823124920.H23447-100000@megazone23.bigpanda.com> References: <20020823124920.H23447-100000@megazone23.bigpanda.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 23 Aug 2002 15:56:56 -0400 Message-Id: <1030132646.29122.10.camel@Monet> Mime-Version: 1.0 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/333 X-Sequence-Number: 9179 Thanks a lot! It works. :) On Fri, 2002-08-23 at 15:51, Stephan Szabo wrote: > On 23 Aug 2002, Wei Weng wrote: > > > I have this query > > > > UPDATE ONLY ContentSummaries > > SET AccessID = '685d96de-1d09-11b2-beec-0001031d54ce' > > FROM Categories AS cat, ContentTypes AS ct, ContentSummaries AS cs LEFT > > OUTER JOIN Publishers AS pb ON (pb.PublisherID = cs.PublisherID) > > WHERE cs.CreationDate IS NOT NULL AND cat.CategoryID = cs.CategoryID AND > > ct.ContentTypeID = cs.ContentTypeID AND cat.CategoryID = > > '391b11d0-1d09-11b2-a312-0001031d54ce' > > You do realize you're getting two copies of ContentSummaries in this > update and only one is actually being constrained afaics (and it's not the > one being updated). Perhaps something like > cs.ContentTypeID=ContentSummaries.ContentTypeID or something like that > in the where clause? > > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > -- Wei Weng Network Software Engineer KenCast Inc.