Microsoft
Software
Hardware
Network
Question : How to request previous month's records in my sql's where clause?
I'd like to display on my page the previous month's records. This is the WHERE clause of my sql:
WHERE MonthOfReport like 'June'
On my page I display last month's name like this:
<%response.Write(MonthName
(month(dat
e)-1))%>
How could I call last month's records in my SQL automatically?
I tried this but it didn't work:
WHERE MonthOfReport like '%response.Write(MonthName
(month(dat
e)-1))%'
Could anyone please help? Thank you
Related Solutions:
How can I display previous month's records in January?
Answer : How to request previous month's records in my sql's where clause?
SQL = "SELECT * FROM tblName WHERE MonthOfReport LIKE '%" & MonthName(month(now)-1) & "%' "
/ Tobzzz
Random Solutions
NTFS Permissions Not Applying on Win Vista/Win 7
Basic Authentication Box Is Displayed When You Log on to OWA 2003 with HTTP
How to modify this javascript to open links in a new window?
select * in view
jquery - gmaps
How to redirect to other action by using MVC2 framework
Move request stuck. Unmount database?
How do you create an ACD Hunt Group in Cisco Call manager?
Sharepoint 2007 - Workflows and Custom Event Handlers
Update data and select from same table