Hi All, i need to know how to solve the error in the following query:
UPDATE table1 SET StopTime = NOW() WHERE StationId = (SELECT StationId
FROM table1 WHERE StopTime = "0000-00-00 00:00:00" AND Id = (SELECT
MAX(Id) FROM table1 WHERE UserName = "notconnected") )
The ERROR message is :
failed : You can't specify target table 'table1' for update in FROM
clause
What does this error mean, and how do i rectify it?
Thanks Wes
UPDATE table1 SET StopTime = NOW() WHERE StationId = (SELECT StationId
FROM table1 WHERE StopTime = "0000-00-00 00:00:00" AND Id = (SELECT
MAX(Id) FROM table1 WHERE UserName = "notconnected") )
The ERROR message is :
failed : You can't specify target table 'table1' for update in FROM
clause
What does this error mean, and how do i rectify it?
Thanks Wes
Comment