Skip to content
Advertisement

ASP classic select date BETWEEN dates on SQL Server

I run the next query in my classic asp code and it run perfect. it returns results between the days “from” and “to”

However,I cannot find out what is wrong with the next query: I want it to return the results of the last week that are recorded in the database.

Any Ideas?
The query is ok when i run it on Microsoft SQL Server Management studio. Maybe the problem is at the syntax?

Advertisement

Answer

You are missing a quotation mark before order by DateAndTime

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement