Re: [GENERAL] Dynamic update - Mailing list pgsql-general

From Simon Drabble
Subject Re: [GENERAL] Dynamic update
Date
Msg-id Pine.LNX.4.10.9911031416470.19564-100000@dragon.localdomain
Whole thread Raw
In response to Re: [GENERAL] Dynamic update  (Alain TESIO <alain_tesio@yahoo.com>)
List pgsql-general
On Wed, 3 Nov 1999, Alain TESIO wrote:

> -- Simon Drabble <simon@eskimo.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@eskimo.com


pgsql-general by date:

Previous
From: Alain TESIO
Date:
Subject: Re: [GENERAL] Dynamic update
Next
From: "Timothy H. Keitt"
Date:
Subject: query seems too slow