Easyone for u SQL guys, how do i update the last record in a table?
I have this but it doesn't work
UPDATE usertrack SET heading_to = "123" WHERE unique_id=max(unique_id)
It still doesn't work??
Error Executing Database Query.
Syntax error or access violation: You have an error in your SQL syntax near ' UPDATE usertrack SET heading_to = '/images/orgcharts/busimprovement.jpg' WHERE unique_id= (select max(unique_id) from usertrack)
DATASOURCE luthor
VENDORERRORCODE 1064
SQLSTATE 42000
I have worked out that my database (mascon) or server (coldfusion) does not support subqueries. Perhaps I can split the SQL and store them in variables.
Many Thanks for your help.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.