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

From Alain TESIO
Subject Re: [GENERAL] Dynamic update
Date
Msg-id 19991103190909.29682.rocketmail@web301.mail.yahoo.com
Whole thread Raw
Responses Re: [GENERAL] Dynamic update  (Simon Drabble <simon@eskimo.com>)
Re: [GENERAL] Dynamic update  ("Aaron J. Seigo" <aaron@gtv.ca>)
List pgsql-general
-- 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

__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

pgsql-general by date:

Previous
From: Simon Drabble
Date:
Subject: Dynamic update
Next
From: Simon Drabble
Date:
Subject: Re: [GENERAL] Dynamic update