pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
RE: subqueries as values in updates
2+ messages / 2 participants
[nested] [flat]

* RE: subqueries as values in updates
@ 2000-12-08 11:30  Francis Solomon <francis@stellison.co.uk>
  parent: patrick.jacquot@anpe.fr
  0 siblings, 0 replies; 2+ messages in thread

From: Francis Solomon @ 2000-12-08 11:30 UTC (permalink / raw)
  To: patrick.jacquot@anpe.fr; pgsql-sql

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 ?




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* subqueries as values in updates
@ 2000-12-08 13:00  patrick.jacquot@anpe.fr
  0 siblings, 1 reply; 2+ messages in thread

From: patrick.jacquot@anpe.fr @ 2000-12-08 13:00 UTC (permalink / raw)
  To: pgsql-sql

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 ?




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2000-12-08 13:00 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-12-08 13:00 subqueries as values in updates patrick.jacquot@anpe.fr
2000-12-08 11:30 ` Francis Solomon <francis@stellison.co.uk>

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