Hello, I want to update columns in a table that match a fixed key from the same column of the same table matching another fixed key. There can be several tuples per key distinguished by a secondary id. Tuples are unique with the combined keys. Maybe a query could look something like this:
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; But it's a syntax error. I tried a subselect but i'm failing to connect the subselect's 2nd ID with the update's 2nd ID. Any help ? Thanks, Jürgen ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match