Results 1 to 3 of 3

Thread: [RESOLVED] Summing Fields

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2004
    Location
    Arkansas
    Posts
    35

    Resolved [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.

  2. #2
    Fanatic Member BillBoeBaggins's Avatar
    Join Date
    Jan 2003
    Location
    in your database, dropping your tables.
    Posts
    628

    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

  3. #3

    Thread Starter
    Member
    Join Date
    Dec 2004
    Location
    Arkansas
    Posts
    35

    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
  •  



Click Here to Expand Forum to Full Width