I have tried getting this right from within an Access Grid but without
success. My table looks like this:
12/24/2004 10:50:00 AM | CC | Level 2 | Heigle, Terry | 230
12/24/2004 3:00:00 PM | CC| Level 3 | Jost, Karen | 310
12/24/2004 7:00:00 PM | CC | Level 3 | Jost, Karen | 240
12/24/2004 10:00:00 PM | CC | Level 4 | Jost, Karen | 180
12/24/2004 11:00:00 PM | CC | Level 2 | Smith, Bob | 60
My ultimate output would be a crosstab sort of statment that would have the
four uniqe levels as columns and the dates as rows with a summation of the
amount of time at each level (level is the last value furthest from the
left)
My rudimentary SQL as come up with this...
TRANSFORM Sum(tblHistory. previousminutes ) AS SumOfpreviousmi nutes
SELECT tblHistory.dtmT ime
FROM tblHistory
GROUP BY tblHistory.dtmT ime
PIVOT tblHistory.stat us;
The only thing wrong with this is it lists all entries for 12/24/2005
instead of one row for 12/24....
Can anyonoe suggest a corrrection
Regards
John Kostenbader
success. My table looks like this:
12/24/2004 10:50:00 AM | CC | Level 2 | Heigle, Terry | 230
12/24/2004 3:00:00 PM | CC| Level 3 | Jost, Karen | 310
12/24/2004 7:00:00 PM | CC | Level 3 | Jost, Karen | 240
12/24/2004 10:00:00 PM | CC | Level 4 | Jost, Karen | 180
12/24/2004 11:00:00 PM | CC | Level 2 | Smith, Bob | 60
My ultimate output would be a crosstab sort of statment that would have the
four uniqe levels as columns and the dates as rows with a summation of the
amount of time at each level (level is the last value furthest from the
left)
My rudimentary SQL as come up with this...
TRANSFORM Sum(tblHistory. previousminutes ) AS SumOfpreviousmi nutes
SELECT tblHistory.dtmT ime
FROM tblHistory
GROUP BY tblHistory.dtmT ime
PIVOT tblHistory.stat us;
The only thing wrong with this is it lists all entries for 12/24/2005
instead of one row for 12/24....
Can anyonoe suggest a corrrection
Regards
John Kostenbader
Comment