JohnMac328
asked on
Coldfusion CS3 - Display most recent record
This isn't too difficult but the syntax errors are bothersome. I am retrieving the latest record by ID but all the records are displaying.
select * from #vTableName# ORDER BY ID desc
I have tried TOP 1 and MAX but it won't make it through the syntax error. What would be the correct statement?
Thanks,
John
select * from #vTableName# ORDER BY ID desc
I have tried TOP 1 and MAX but it won't make it through the syntax error. What would be the correct statement?
Thanks,
John
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Though ID numbers can be recycled, so I usually prefer to order by a datetime stamp column.
ASKER
Thanks, I knew I was close but got too frustrated.