On Wed, 26 Jun 2002 10:02:43 +0200, "Peter Alberer"
<h9351252@obelix.wu-wien.ac.at> 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