banshee343
New member
- Local time
- Tomorrow, 01:46
- Joined
- Mar 17, 2010
- Messages
- 3
Hi im trying to have a query that reports down time for a date range
[tblMain]
ID
ShiftDate
[tblShift]
ID
MainID
Task
[tblDownTime]
starttime
stoptime
Fault
ShiftID
I'm trying to make a query to display the sum of tbldowntime for each date ie..
1/1/2010 444min
2/1/2010 323min
Where each date has multiple downtime entriesi can do this fine, but what would be alot better is if i can have it return 2 fields based on [tblDownTime].[Fault] i.e..
Date Fault1 Fault2
1/1/2010 200min 244min
2/1/2010 105min 218min
there is only ever 2 different faults types
Im really lost as how to achive this i can do it in 2 seperate querys but id really like to be able to do it in the 1 if i can, as i want to graph this data later and it'd be much eaiser if i could export 1 query to excel rather then multiple querys.
I assume i need 2 subquerys, one for each fault? ive had a look into them but really cant grasp it at the moment
any guidance would be greatly appreciated
[tblMain]
ID
ShiftDate
[tblShift]
ID
MainID
Task
[tblDownTime]
starttime
stoptime
Fault
ShiftID
I'm trying to make a query to display the sum of tbldowntime for each date ie..
1/1/2010 444min
2/1/2010 323min
Where each date has multiple downtime entriesi can do this fine, but what would be alot better is if i can have it return 2 fields based on [tblDownTime].[Fault] i.e..
Date Fault1 Fault2
1/1/2010 200min 244min
2/1/2010 105min 218min
there is only ever 2 different faults types
Im really lost as how to achive this i can do it in 2 seperate querys but id really like to be able to do it in the 1 if i can, as i want to graph this data later and it'd be much eaiser if i could export 1 query to excel rather then multiple querys.
I assume i need 2 subquerys, one for each fault? ive had a look into them but really cant grasp it at the moment