Brilliant! that helps a great deal. I take it the overhead of doing multiple statements in a single query is less than that of doing two seperate queries?
The only problem is the snippet you kindly attached doesn't seem to work. I get the following error:
Characters found after end of SQL statement.
If I remove the semi colon ; from the query qhich I assumed was causing the error then I get another error:
Syntax error (missing operator) in query expression 'id = (SELECT id FROM menus WHERE menuTypeID = 18 AND sortedBy = 8) UPDATE menus SET sortedBy = 8 WHERE id = 9'.
Thank you for your help and the very quick response
Main Topics
Browse All Topics





by: PluckaPosted on 2007-11-21 at 02:15:36ID: 20326529
No it's not possible. You can only update multiple records in one query to set the same colum value.
You can however put multiple SQL statements in a single CFQUERY
Select allOpen in new window