pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Wei Weng <wweng@kencast.com>
To: pgsql-sql@postgresql.org
Subject: Re: question on UPDATE TABLE
Date: 23 Aug 2002 15:56:56 -0400
Message-ID: <1030132646.29122.10.camel@Monet> (raw)
In-Reply-To: <20020823124920.H23447-100000@megazone23.bigpanda.com>
References: <20020823124920.H23447-100000@megazone23.bigpanda.com>

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.





view thread (3+ messages)

Message-ID: <1030132646.29122.10.camel@Monet>
Permalink:  ../1030132646.29122.10.camel@Monet/
Also on:    postgresql.org/message-id/1030132646.29122.10.camel@Monet

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: wweng@kencast.com
  Subject: Re: question on UPDATE TABLE
  In-Reply-To: <1030132646.29122.10.camel@Monet>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox