A
Art Vandaley
Hi,
I have a table with following data:
DATE_______WORKING HOURS_________DESCRIPTION
MARCH, 1___________8_________________WORK
MARCH, 2___________8_________________WORK
MARCH, 3___________5_________________WORK
MARCH, 3___________3_________________TRAVEL
..
..
..
MARCH, 28__________8_________________TRAVEL
MARCH, 29__________7_________________WORK
MARCH, 29__________1_________________TRAVEL
MARCH, 30__________8_________________WORK
MARCH, 31__________8_________________WORK
APRIL, 3_____________8_________________WORK
APRIL, 4_____________8_________________TIME OFF
APRIL, 5_____________8_________________WORK
APRIL, 6_____________5_________________WORK
APRIL, 6_____________3_________________TRAVEL
APRIL, 7_____________8_________________DAY OFF
..
..
..
I want a qurey do like below:
Column1___Column2____________Column3___Column4____Column5
MONTH___WORKING HOURS__TRAVEL__TIME OFF__DAY OFF
3_________160________________3_________0_________0
4_________160________________12________8_________8
..
..
Column2= monthly sum of WORK+TRAVEL+TIME OFF+DAY OFF
Column3= monthly sum of TRAVEL
Column4= monthly sum of TIME OFF
Column5= monthly sum of DAY OFF
In my query, every row is sum of entire month. First and Second columns are
not problem. But I need to seperate travel, time off and day off from
working hours and make their own columns with their montly totals. This is
not easy to do it for me because I try to set criteria which will use
DESCRIPTION column of table to seperate travel, time off and day off hours
as a criteria. I do not know to set suitable criteria for this purpose. Or,
what can I do if setting criteria is not possible?
Thanks for any help in advance.
I have a table with following data:
DATE_______WORKING HOURS_________DESCRIPTION
MARCH, 1___________8_________________WORK
MARCH, 2___________8_________________WORK
MARCH, 3___________5_________________WORK
MARCH, 3___________3_________________TRAVEL
..
..
..
MARCH, 28__________8_________________TRAVEL
MARCH, 29__________7_________________WORK
MARCH, 29__________1_________________TRAVEL
MARCH, 30__________8_________________WORK
MARCH, 31__________8_________________WORK
APRIL, 3_____________8_________________WORK
APRIL, 4_____________8_________________TIME OFF
APRIL, 5_____________8_________________WORK
APRIL, 6_____________5_________________WORK
APRIL, 6_____________3_________________TRAVEL
APRIL, 7_____________8_________________DAY OFF
..
..
..
I want a qurey do like below:
Column1___Column2____________Column3___Column4____Column5
MONTH___WORKING HOURS__TRAVEL__TIME OFF__DAY OFF
3_________160________________3_________0_________0
4_________160________________12________8_________8
..
..
Column2= monthly sum of WORK+TRAVEL+TIME OFF+DAY OFF
Column3= monthly sum of TRAVEL
Column4= monthly sum of TIME OFF
Column5= monthly sum of DAY OFF
In my query, every row is sum of entire month. First and Second columns are
not problem. But I need to seperate travel, time off and day off from
working hours and make their own columns with their montly totals. This is
not easy to do it for me because I try to set criteria which will use
DESCRIPTION column of table to seperate travel, time off and day off hours
as a criteria. I do not know to set suitable criteria for this purpose. Or,
what can I do if setting criteria is not possible?
Thanks for any help in advance.