Click here to Skip to main content
15,790,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a database table having fields employee name, designation, salary ,month,year. I want to display designation wise report for sum of salary from month to to month in vb.net month select from combo box
Posted
Comments
OriginalGriff 30-May-12 4:43am    
Try providing an example - sample data in your table, and what the final query results should look like.
Use the "Improve question" widget to edit your question and provide better information.
Mohibur Rashid 30-May-12 5:08am    
Your English is confusing. would you please tell us what you exactly do?
1. Show salary sorted by Designation
or
2. Show the list of sum of salary by designation.

1 solution

SQL
SELECT     sum(salary),designation,month
FROM         table_Name
GROUP BY designation,month
HAVING      month BETWEEN 'FromMonth' AND 'ToMonth' 
 
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