From: Leif B. Kristensen <leif@solumslekt.org>
To: pgsql-sql@postgresql.org
Subject: Re: update with subselect (long)
Date: Thu, 17 Mar 2005 15:34:57 +0100
Message-ID: <200503171534.58027.leif@solumslekt.org> (raw)
In-Reply-To: <20050317055420.S10944@megazone.bigpanda.com>
References: <200503171407.11017.leif@solumslekt.org>
<20050317055420.S10944@megazone.bigpanda.com>
On Thursday 17 March 2005 15:01, Stephan Szabo wrote:
> The above needs some work. The below should be acceptable to the
> system.
>
> update name_parts set name_part_type=5 from (select name_id from
> name_parts where name_part_type=6) as gpt_type where
> name_parts.name_id=gpt_type.name_id and name_part_type=3;
Thank you very much!
> I'm a bit worried about blindly changing the type for anything that
> has a name_part_type=6 record, but given your usage that might be
> okay.
Yes, this is a kind of one-shot job. I shall be going through all the
records manually later and correct the ones that don't fit the bill
exactly.
--
Leif Biberg Kristensen
http://solumslekt.org/
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: leif@solumslekt.org
Subject: Re: update with subselect (long)
In-Reply-To: <200503171534.58027.leif@solumslekt.org>
* 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