Hello,
I was trying to find the best query to use on the table below. All of the results are in one table and the wold all have the same project number so where projectnum ='1'
I'd like to return the total hours per user sorted by user then by month and year. so the return would be something like.
UserNo RptHr RptMo RptYr
User1 12 03 2003
User1 4 06 2004
User1 8 09 2004
User2 3 08 2004
User3 6 05 2004
User4 8 05 2004
I've tried this
But it doesn't even seem close 8/
Thanks, Danzig
I was trying to find the best query to use on the table below. All of the results are in one table and the wold all have the same project number so where projectnum ='1'
Code:
UserNo RptMo RptHr RptYr
User1 06 1 2004
User3 05 6 2004
User2 08 3 2004
User1 06 3 2004
User1 03 12 2003
User1 09 8 2004
User4 05 8 2004
I'd like to return the total hours per user sorted by user then by month and year. so the return would be something like.
UserNo RptHr RptMo RptYr
User1 12 03 2003
User1 4 06 2004
User1 8 09 2004
User2 3 08 2004
User3 6 05 2004
User4 8 05 2004
I've tried this
Code:
SELECT UserNo, SUM(RptHr)
FROM db_projects where ProjectID = '1' group by UserNo
But it doesn't even seem close 8/
Thanks, Danzig