Re: Updating values of a record variable
От
Manfred Koizar
Тема
Re: Updating values of a record variable
Дата
Msg-id
va5jhu0ivgpulpj592n7ith30df3jig91p@4ax.com
Ответ на
Updating values of a record variable (Peter Alberer)
Список
Дерево обсуждения
Updating values of a record variable "Peter Alberer" <h9351252@obelix.wu-wien.ac.at>
Re: Updating values of a record variable Manfred Koizar <mkoi-pg@aon.at>
On Wed, 26 Jun 2002 10:02:43 +0200, "Peter Alberer"
wrote:
>It should run thru every row of lr_concepts and count the number of
>related records in the acs_rels table. The value of the count should be
>written into the column "related_lr" of the table lr_concepts.
Peter, try:
UPDATE lr_concepts
SET related_lr = (
SELECT COUNT(*)
FROM acs_rels a
WHERE a.rel_type = 'lr_concept_rel' AND
a.object_id_one = lr_concepts.lr_concept_id);
Servus
Manfred
В списке pgsql-general по дате отправления