|
-
Jun 4th, 2009, 12:48 PM
#1
Thread Starter
Member
[RESOLVED] Summing Fields
Hello All,
I am wanting to create a summary report for workorders for a specific vehicle.
I am wanting to sum the total parts and labor for the workorder creating one record per workorder. Right now I use ROquantity * ROUnitprice which gives me a total but for each part on the workorder. What I want is to sum all the parts on the workorder and then my summary report would show
Date RoNumber WorkDone Total Parts Total Labor
for each work order associated with that vehicle.
I cannot figure out how to total all the parts and labor for this report
Any help would be appreciated.
-
Jun 4th, 2009, 12:59 PM
#2
Fanatic Member
Re: Summing Fields
Code:
Select WO.ID, WD.Total
from WorkOrders WO
INNER JOIN
(select ID, sum(unit*price) as Total from WorkDetails group by ID) WD ON
WO.ID=WD.ID
-
Jun 5th, 2009, 03:43 PM
#3
Thread Starter
Member
Re: Summing Fields
Thank you much, it was what I needed
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|