Click here to Skip to main content
15,903,012 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In my project I have to see the monthy sales.In the database I'm having a view named sales, which consist of date field in dd/MM/yy format.How can I see the sales of a particular month.
Posted

u can see the sales of particular month using "SQL" month() function in where clause as.

select * from tablename where month(columname) = month value
:)
 
Share this answer
 
Comments
Rajesh Anuhya 27-Oct-10 3:12am    
Good Answer.., Adding to that "month value" should be integer...
Hi,

Try this

select * from tablename where DateName(mm,columname) = month value

Refer http://msdn.microsoft.com/en-us/library/ms174395.aspx[^]

:thumbsup:
 
Share this answer
 
simple by using where Clause
as

select * from tablename where columname = value
 
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