How do I workaround this error ? You can't specify target table my table for update in FROM clause
- by Jules
I'm struggling to convert my select query into a update query, it has aliases..
Update pads set RemoveMeDate = '1999-01-01 00:00:00' where padid in (
SELECT old_table.padid
FROM `jules-fix-reasons`.`pads` AS old_table
JOIN `jules`.`pads` AS new_table ON old_table.padid = new_table.`PadID`
WHERE new_table.RemoveMeDate <> '2001-01-01 00:00:00'
AND old_table.RemoveMeDate = '2001-01-01 00:00:00')
I've tried removing the aliases, but that doesn't help :(