From: Leonid P. Klemjatsionok <kl@84105.aanet.ru>
To: Moray McConnachie <moray.mcconnachie@computing-services.oxford.ac.uk>
Cc: pgsql-sql@postgresql.org
Subject: Re[2]: update only if single row
Date: Fri, 7 Apr 2000 16:04:18 +0400
Message-ID: <2669.000407@84105.aanet.ru> (raw)
References: <006001bfa06d$d45f5480$760e01a3@oucs.ox.ac.uk>
MM> I'm not quite sure that the aliasing works properly in this query either -
MM> does the EXISTS clause pick up the a alias?
MM> UPDATE contact a SET a.bounce=1 WHERE a.email ~* 'rvro' AND NOT EXISTS
MM> (SELECT id FROM contact b WHERE b.email ~*'rvro' AND a.id !=b.id);
Aliasing does not work properly on v6.5. You can use full name.
UPDATE contact SET bounce=1 WHERE email ~* 'rvro' AND NOT EXISTS
(SELECT * FROM contact b WHERE b.email ~* 'rvro' AND contact.id != b.id);
Best regards,
LPK Station mailto:kl@84105.aanet.ru
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: kl@84105.aanet.ru, moray.mcconnachie@computing-services.oxford.ac.uk
Subject: Re: update only if single row
In-Reply-To: <2669.000407@84105.aanet.ru>
References: <006001bfa06d$d45f5480$760e01a3@oucs.ox.ac.uk> <2669.000407@84105.aanet.ru>
* 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