From: Richard Huxton <dev@archonet.com>
To: mdavis@sevainc.com
To: 'Jeff Putsch' <putsch@mxim.com>
To: pgsql-sql@postgresql.org
Subject: Re: RE: Help with UPDATE syntax
Date: Thu, 15 Mar 2001 20:33:29 -0000
Message-ID: <012e01c0ad8f$335aef60$1001a8c0@archonet.com> (raw)
References: <01C0AD2E.3F32AB40.mdavis@sevainc.com>
From: "Michael Davis" <mdavis@sevainc.com>
> 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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: dev@archonet.com, mdavis@sevainc.com, putsch@mxim.com
Subject: Re: Help with UPDATE syntax
In-Reply-To: <012e01c0ad8f$335aef60$1001a8c0@archonet.com>
References: <01C0AD2E.3F32AB40.mdavis@sevainc.com> <012e01c0ad8f$335aef60$1001a8c0@archonet.com>
* 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