Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AAAAA
Starting Member
1 Post |
Posted - 2012-08-14 : 16:23:56
|
| I want to make a report that can give me the total number of hours worked by the employees in the department in this manner. Sub Departments--->Departments 1 2 3 4 5 ........ so on1 23 33 32 45 .. so on23||I have the department table, Schedule table and Employee table but I need help in writing the query to generate the working hours of that sub-dept in that particular dept.The dept table also has the parent id which indicates the parent node for other sub departmentI need help in getting an idea to write a query, pls help,thnx |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-08-14 : 16:51:02
|
| have a look at PIVOT syntax in books online------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|