Re: [GENERAL] Dynamic update

Поиск
Список
Период
Сортировка
От Alain TESIO
Тема Re: [GENERAL] Dynamic update
Дата
Msg-id 19991103190909.29682.rocketmail@web301.mail.yahoo.com
обсуждение исходный текст
Ответы Re: [GENERAL] Dynamic update  (Simon Drabble <simon@eskimo.com>)
Re: [GENERAL] Dynamic update  ("Aaron J. Seigo" <aaron@gtv.ca>)
Список 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 по дате отправления:

Предыдущее
От: Simon Drabble
Дата:
Сообщение: Dynamic update
Следующее
От: Simon Drabble
Дата:
Сообщение: Re: [GENERAL] Dynamic update