J
Jeff
I have an Union query which looks like the following:
SELECT ALL *
FROM [order Details]
UNION SELECT ALL *
FROM[Order Details Labor]
ORDER BY [OrderID];
I want the query to add together any duplicate records for
the same ORDERID
The Fields are OrderID, ProductID, Quantity, UnitPrice and
Line Total
So I want to add the quantities together and the LIne
total.
Example
ORDERID PRODUCTID QUANTITY UNITPRICE LINETOTAL
2000 Comb 1 $5.00 $5.00
2000 Comb 1 $5.00 $5.00
Result wanted:
2000 Comb 2 $5.00 $10.00
Thank you for any help that you can give me.
JEff
SELECT ALL *
FROM [order Details]
UNION SELECT ALL *
FROM[Order Details Labor]
ORDER BY [OrderID];
I want the query to add together any duplicate records for
the same ORDERID
The Fields are OrderID, ProductID, Quantity, UnitPrice and
Line Total
So I want to add the quantities together and the LIne
total.
Example
ORDERID PRODUCTID QUANTITY UNITPRICE LINETOTAL
2000 Comb 1 $5.00 $5.00
2000 Comb 1 $5.00 $5.00
Result wanted:
2000 Comb 2 $5.00 $10.00
Thank you for any help that you can give me.
JEff