Click here to Skip to main content
15,883,830 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi!

I have a table with two columns From Date and To Date.
i want to get data from current month and previous month.

how can i write my query?

how can i get previous month?

i am not passing any parameters to Store Procedure.
i just want the data of current month and previous month.
based on the From date column of my table.



Minal Shah.
Posted
Updated 1-May-10 0:26am
v3

Have a look here.
 
Share this answer
 
You could pass the two dates in question as parameters to a stored procedure, and then write an unencumbered stored proc.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900