BoxRec wrote:
Can some kind soul please help me turn this into sql
UPDATE TableA
SET rowA.colA = rowB.colB
WHERE rowA.colC = rowB.colD
This is one of those uses for the MySQL syntax extension for multi-table
UPDATE operations. It isn't standard SQL, but I think the following
will do what you want (NB: I haven't tested this):
UPDATE rowA SET rowA.colA = rowB.colB
FROM TableA AS rowA, TableA AS rowB
WHERE rowA.colC = rowB.colD
Note that you must use the table alias right after UPDATE, not the real
name of the table.
Regards,
Bill K.