donjohnson
Programmer
- Jun 23, 2004
- 53
Hello!
I would like to have a single query return a set of records that has (1) a Grand Total for a given date, (2) Subtotals for Date, Customer, Location, and (3) 1 to n Detail records for each (2).
Can this be done in a single query, or how can I combine the results from multiple queries into a single record set?
An example table def has:
Date
Customer
Location
WorkOrder
Hours (to be summed in totals)
Accepted (summed)
Refusals (summed)
Accept/Hour (computed field here, and computed in totals)
Also, I pull a field, Rate from a WorkOrder table to calculate Revenue (Hours * Workorder.rate, also computed at totals), and sum(Revenue)/sum(Hours) at the totals.
Can anyone help or direct me here?
Thanks!
Don
I would like to have a single query return a set of records that has (1) a Grand Total for a given date, (2) Subtotals for Date, Customer, Location, and (3) 1 to n Detail records for each (2).
Can this be done in a single query, or how can I combine the results from multiple queries into a single record set?
An example table def has:
Date
Customer
Location
WorkOrder
Hours (to be summed in totals)
Accepted (summed)
Refusals (summed)
Accept/Hour (computed field here, and computed in totals)
Also, I pull a field, Rate from a WorkOrder table to calculate Revenue (Hours * Workorder.rate, also computed at totals), and sum(Revenue)/sum(Hours) at the totals.
Can anyone help or direct me here?
Thanks!
Don