Jurgen,
> UPDATE a.mytable from b.mytable
> SET a.mycolumn = b.mycolumn
> WHERE a.firstid = some_key
> AND b.firstid = some_other_key
> AND a.secondaryid = b.secondaryid;
Very close, actually; you just need to fix the table alias:
UPDATE mytable FROM mytable as b SET mytable.mycolumn = b.mycolumnWHERE mytable.firstid = some_key AND
b.firstid= some_other_key AND mytable.secondaryid = b.secondaryid;
AFAIK, one can't alias a table name in an UPDATE clause. So for that instance
of the table, you need to use the full name.
--
-Josh BerkusAglio Database SolutionsSan Francisco