G
Guest
Hello programmers. I have a table (see below sample) that has employee check dates and hours. I would like to code or query the sum hours for all the EmpID's by year. (i.e. EmpID:00134, Year:2003, TotalHours:12
EmpID:00127, Year:2003, TotalHours:6
EmpID:00119, Year:2003, TotalHours:85
NOTE: I WILL HAVE MY USERS ENTER THE YEAR VIA A CONTROL. THANKS FOR ANY HELP I WILL BE WORKING ON IT AS WELL.
EmpID CheckDate HOUR
00134 1/7/2001 7
00134 1/15/2001 6
00134 1/20/2002 5
00134 1/30/2002 2
00134 2/3/2003 6
00134 2/14/2003 5
00127 1/7/2001 2
00127 1/25/2001 1
00127 1/20/2002 8
00127 1/28/2002 7
00127 2/3/2003 4
00127 2/15/2003 1
00119 1/7/2001 6
00119 1/13/2001 6
00119 1/20/2002 1
00119 1/28/2002 2
00119 2/3/2003 6
00119 2/15/2003 1
EmpID:00127, Year:2003, TotalHours:6
EmpID:00119, Year:2003, TotalHours:85
NOTE: I WILL HAVE MY USERS ENTER THE YEAR VIA A CONTROL. THANKS FOR ANY HELP I WILL BE WORKING ON IT AS WELL.
EmpID CheckDate HOUR
00134 1/7/2001 7
00134 1/15/2001 6
00134 1/20/2002 5
00134 1/30/2002 2
00134 2/3/2003 6
00134 2/14/2003 5
00127 1/7/2001 2
00127 1/25/2001 1
00127 1/20/2002 8
00127 1/28/2002 7
00127 2/3/2003 4
00127 2/15/2003 1
00119 1/7/2001 6
00119 1/13/2001 6
00119 1/20/2002 1
00119 1/28/2002 2
00119 2/3/2003 6
00119 2/15/2003 1