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
tips for installing service pack on windows 2008
How to create an installation (Setup.exe or .msi) in Visual Studio 2008
451 4.4.0 Primary target IP address responded with: ""554 mail.domain.gov""
Create Logoff Script in Group Policy via Batch
Understanding the push_back method of putting information into vectors...
REPEATED infections with Conficker.C worm: Windows 7 Pro
create dynamic content on hover
Outlook Sync multiple users and multiple computers
Help me find a Dual DVI low profile video card with bracket
Slow Ubuntu on Netbook