Greg Wilson <[EMAIL PROTECTED]> wrote:

-- Try to update the final table in place
update Result set AffilId = (
 select Places.Ident from Places, People, Result
 where (People.Ident = Result.Ident)
   and (People.Affil = Places.Name)
);

Yours is not a correlated subquery: it uses its own reference to Result table, rather than correlate with the Result's record you are trying to update. Thus, the subselect produces the same resultset over and over, and you are just picking the top row from this resultset.

Just remove Result from the FROM clause of the nested select.

Igor Tandetnik

Reply via email to