From: Jack Gao <wei@gaofamily.org>
To: pgsql-sql@postgresql.org
Subject: Re: Is this a bug?
Date: Tue, 13 Nov 2001 10:07:56 -0800
Message-ID: <9srnih$10qq$1@news.tht.net> (raw)
References: <9sqakt$op1$1@news.tht.net>
<73t1vtk61pcsob9pa0p32a9eou3a31tolh@4ax.com>
"Carl van Tast" <vanTast@Pivot.at> wrote in message
news:73t1vtk61pcsob9pa0p32a9eou3a31tolh@4ax.com...
> On Mon, 12 Nov 2001 21:20:44 -0800, "Jack Gao" <wei@gaofamily.org>
> wrote:
>
> >Update tblUserConfig Set Value = '1' From tblUserConfig As a Join
> >tblConfigItem As b On a.ItemID = b.ID And b.Scope = 3 Where a.UserID = 1
And
> >b.Name = 'UserClassID';
> >
> >It always update all records in tblUserConfig table!!!
>
> Jack,
>
> don't include the table you want to update in the FROM clause. Just
> try:
>
> Update tblUserConfig
> Set Value = '1'
> From tblConfigItem As b
> Where tblUserConfig.ItemID = b.ID
> And b.Scope = 3
> And tblUserConfig.UserID = 1
> And b.Name = 'UserClassID';
>
> Kind regards
> Carl van Tast
So, I can't use JOIN in UPDATE?
Thanks for your reply
Jack
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: wei@gaofamily.org
Subject: Re: Is this a bug?
In-Reply-To: <9srnih$10qq$1@news.tht.net>
* 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