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?