Re: RE: Help with UPDATE syntax

From: "Richard Huxton" <dev(at)archonet(dot)com>
To: <mdavis(at)sevainc(dot)com>, "'Jeff Putsch'" <putsch(at)mxim(dot)com>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: RE: Help with UPDATE syntax
Date: 2001-03-15 20:33:29
Message-ID: 012e01c0ad8f$335aef60$1001a8c0@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

From: "Michael Davis" <mdavis(at)sevainc(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Gerald Gutierrez 2001-03-15 21:06:22 Re: VACUUM kills Index Scans ?!
Previous Message Stephan Szabo 2001-03-15 20:30:34 Re: VACUUM kills Index Scans ?!