Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 4834F476846 for ; Fri, 23 Aug 2002 15:51:40 -0400 (EDT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id C78AF476845 for ; Fri, 23 Aug 2002 15:51:39 -0400 (EDT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 8ECE7D602; Fri, 23 Aug 2002 12:51:40 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 848165C04; Fri, 23 Aug 2002 12:51:40 -0700 (PDT) Date: Fri, 23 Aug 2002 12:51:40 -0700 (PDT) From: Stephan Szabo To: Wei Weng Cc: Subject: Re: question on UPDATE TABLE In-Reply-To: <1030130205.29121.8.camel@Monet> Message-ID: <20020823124920.H23447-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/332 X-Sequence-Number: 9178 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?