I try to update some field from 2 tables with join clause.
But every test is bad, mysql return error.
My query is:
UPDATE `Table1` t1 , `Table2` t2
LEFT OUTER JOIN `Table2` t3 ON t1.acIndex = t3.ecActe
SET t2.ecDate=DATE_SUB(t2.ecDate, INTERVAL 183 DAY), t1.acDateF=DATE_SUB(t1.acDateF, INTERVAL 183 DAY), t1.acDateDebut=DATE_SUB(t1.acDateDebut, INTERVAL 183 DAY)
WHERE (t1.acTraitement='5861' AND t1.acDateDebut>'2012-12-07' )
So could you help me to found why query is bad?
Thanks
The syntax is incorrect. Try this query –