Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fADIbkm42608 for ; Tue, 13 Nov 2001 13:37:46 -0500 (EST) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id fADI8H033629 for pgsql-sql@postgresql.org; Tue, 13 Nov 2001 13:08:17 -0500 (EST) (envelope-from news) From: "Jack Gao" X-Newsgroups: comp.databases.postgresql.sql Subject: Re: Is this a bug? Date: Tue, 13 Nov 2001 10:07:56 -0800 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 36 Message-ID: <9srnih$10qq$1@news.tht.net> References: <9sqakt$op1$1@news.tht.net> <73t1vtk61pcsob9pa0p32a9eou3a31tolh@4ax.com> X-Complaints-To: scrappy@hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 To: pgsql-sql@postgresql.org X-Archive-Number: 200111/200 X-Sequence-Number: 5584 "Carl van Tast" wrote in message news:73t1vtk61pcsob9pa0p32a9eou3a31tolh@4ax.com... > On Mon, 12 Nov 2001 21:20:44 -0800, "Jack Gao" > 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