Received: from www-uk-05.digiserve.com ([195.97.231.11]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f2FN4Hx80785 for ; Thu, 15 Mar 2001 18:04:17 -0500 (EST) (envelope-from dev@archonet.com) Received: from mainbox.archonet.com (mwynhau.demon.co.uk [193.237.186.96]) by www-uk-05.digiserve.com (8.9.1/8.9.1) with ESMTP id XAA19611; Thu, 15 Mar 2001 23:04:58 GMT Received: from client (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with SMTP id CD5E72A689; Thu, 15 Mar 2001 20:33:33 +0000 (GMT) Message-ID: <012e01c0ad8f$335aef60$1001a8c0@archonet.com> From: "Richard Huxton" To: , "'Jeff Putsch'" , References: <01C0AD2E.3F32AB40.mdavis@sevainc.com> Subject: Re: RE: Help with UPDATE syntax Date: Thu, 15 Mar 2001 20:33:29 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200103/326 X-Sequence-Number: 1990 From: "Michael Davis" > Try eliminating the statement " from user_group_map map". It does not belong in the update. Here is the fully rewritten statement: > > update > user_group_map > set > user_id = 4 > where > user_id = 9 and > not exists ( > select * from > user_group_map ug2 > where > user_id = 4 and > ug2.group_id = map.group_id and ^^^ > ug2.role = map.role); ^^^ I take it these are actually "user_group_map"? - Richard Huxton