Click here to Skip to main content
15,881,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have leave table in sql.columns are
SQL
SELECT TOP 1000 [leaveid]
      ,[empcode]
      ,[Leave_type]
      ,[time]
      ,[From_date]
      ,[To_date]
      ,[No_of_days]
  FROM [company].[dbo].[leave]

if employee takes leave from-date=2014-01-01 00:00:00.000,to-date=2014-02-01 00:00:00.000

totally employee takes 32 days leave,in january month he takes 31 and february employee takes one day,total days=32,
i want to display month wise leave display

please help me

thanks in advance
Posted
Comments
Tejas Vaishnav 29-Jan-14 0:38am    
can you add your desired output, along with current output
CBadger 29-Jan-14 2:31am    
As Tejas Vaishnav asked and also what do you mean monthly?
Do you want to find the data over multiple months and then get results per month?

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