Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fADAbhm05148 for ; Tue, 13 Nov 2001 05:37:43 -0500 (EST) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id fADAPWB28898 for pgsql-sql@postgresql.org; Tue, 13 Nov 2001 05:25:32 -0500 (EST) (envelope-from news) From: Carl van Tast X-Newsgroups: comp.databases.postgresql.sql Subject: Re: Is this a bug? Date: Tue, 13 Nov 2001 11:26:12 +0100 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 24 Message-ID: <73t1vtk61pcsob9pa0p32a9eou3a31tolh@4ax.com> References: <9sqakt$op1$1@news.tht.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: scrappy@hub.org X-Newsreader: Forte Agent 1.8/32.548 To: pgsql-sql@postgresql.org X-Archive-Number: 200111/164 X-Sequence-Number: 5548 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