pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Francis Solomon <francis@stellison.co.uk>
To: patrick.jacquot@anpe.fr
To: liste SQL <pgsql-sql@postgresql.org>
Subject: RE: subqueries as values in updates
Date: Fri, 8 Dec 2000 11:30:12 -0000
Message-ID: <NEBBIFFPELJMCJAODNPKIEKOCDAA.francis@stellison.co.uk> (raw)
In-Reply-To: <3A30DB68.6B97A867@anpe.fr>

Hi,

The syntax you used works fine for me.

francis=# select version();
                            version
---------------------------------------------------------------
 PostgreSQL 7.0.2 on i686-pc-linux-gnu, compiled by gcc 2.95.2
(1 row)

Hope this helps

Francis Solomon

> -----Original Message-----
> From: pgsql-sql-owner@postgresql.org
> [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of
> patrick.jacquot@anpe.fr
> Sent: 08 December 2000 13:00
> To: liste SQL
> Subject: [SQL] subqueries as values in updates
>
>
> hello, list.
> are subqueries alloved as values in an update command ?
> e.g.
>
> update a set a.attribute1 = a.attribute1 +
>     (select sum(b.attribute1) from b where b.attribute2=a.attribute2);
>
> If yes, how is the correct syntax ?
> If not, is there a hope for it in a future version ?




view thread (2+ messages)  latest in thread

Message-ID: <NEBBIFFPELJMCJAODNPKIEKOCDAA.francis@stellison.co.uk>
Permalink:  ../NEBBIFFPELJMCJAODNPKIEKOCDAA.francis@stellison.co.uk/
Also on:    postgresql.org/message-id/NEBBIFFPELJMCJAODNPKIEKOCDAA.francis@stellison.co.uk

 · 

reply

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: francis@stellison.co.uk, patrick.jacquot@anpe.fr
  Subject: Re: subqueries as values in updates
  In-Reply-To: <NEBBIFFPELJMCJAODNPKIEKOCDAA.francis@stellison.co.uk>
  References: <3A30DB68.6B97A867@anpe.fr> <NEBBIFFPELJMCJAODNPKIEKOCDAA.francis@stellison.co.uk>

* 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