From: | Simon Drabble <simon(at)eskimo(dot)com> |
---|---|
To: | tesio(at)easynet(dot)fr |
Cc: | Postgres Group <pgsql-general(at)postgreSQL(dot)org> |
Subject: | Re: [GENERAL] Dynamic update |
Date: | 1999-11-03 19:18:18 |
Message-ID: | Pine.LNX.4.10.9911031416470.19564-100000@dragon.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, 3 Nov 1999, Alain TESIO wrote:
> -- Simon Drabble <simon(at)eskimo(dot)com> wrote:
> > Is it possible to update a column with another column's value, say
> >
> > UPDATE member SET votes = `SELECT count(votes) FROM ballot WHERE id
> > = 1`;
> >
> > with or without aggregates?
>
> Have you tried a more direct command ?
>
> UPDATE member SET votes count(votes) FROM ballot WHERE id = 1 ;
>
> (I can't test right now but I don't see why this wouldn't work ...)
>
> Alain
I get parse error at or near count - any variation (without the = sign)
produces a similar error.
TA,
Simon.
>
> __________________________________________________
> Do You Yahoo!?
> Bid and sell for free at http://auctions.yahoo.com
>
--
"Linux - open doors, not windows."
Simon Drabble It's like karma for your brain.
simon(at)eskimo(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Teli | 1999-11-03 19:41:08 | Real Time Applications |
Previous Message | Timothy H. Keitt | 1999-11-03 19:17:52 | query seems too slow |