From: Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
To: Pgsql-sql@postgresql.org
Subject: Re: How to add column from old_table to new_table?
Date: Wed, 21 Sep 2005 14:50:55 +0200
Message-ID: <1127307055.20038.25.camel@Panoramix> (raw)
In-Reply-To: <1127306186.20038.21.camel@Panoramix>
References: <1127306186.20038.21.camel@Panoramix>
Hi,
I made a mistake in describing the query I tried. The query I tried was:
update new_table
set new_attribute = (select old_attribute from old_table, new_table
where old_table.id = new_table.id)
where old_table.id = new_table.id
It actually returns the error "ERROR: more than one row returned by a
subquery used as an expression" if ran.
--
Groeten,
Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
e-mail: J.Kraaijeveld@Askesis.nl
web: www.askesis.nl
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: J.Kraaijeveld@Askesis.nl
Subject: Re: How to add column from old_table to new_table?
In-Reply-To: <1127307055.20038.25.camel@Panoramix>
* 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