Hello all. I once again have a SQL statement problem.
What Im wanting to do is SUM up the Quantity and price.
The SQL statement below does this just fine.
SELECT ScripSaleCart.CartID, ScripSaleProductMaster.Description, ScripSaleCart.Quantity, ScripSaleProductMaster.Price, SUM(Quantity)*(Price) AS Total
FROM ScripSaleProductMaster INNER JOIN ScripSaleCart ON ScripSaleProductMaster.ProductID = ScripSaleCart.ProductID
GROUP BY CartID, Description, Quantity, Price
Below are the results
Now what i want to do is total up the Totals so that i can display the subtotal of the order to the customer.
If this possible to do by changing the above SQL statement?
Thanks Hooks
What Im wanting to do is SUM up the Quantity and price.
The SQL statement below does this just fine.
SELECT ScripSaleCart.CartID, ScripSaleProductMaster.Description, ScripSaleCart.Quantity, ScripSaleProductMaster.Price, SUM(Quantity)*(Price) AS Total
FROM ScripSaleProductMaster INNER JOIN ScripSaleCart ON ScripSaleProductMaster.ProductID = ScripSaleCart.ProductID
GROUP BY CartID, Description, Quantity, Price
Below are the results
Code:
[B]CartID Description Quantity Price Total[/B]
1 test 6 25.00 150.00
2 test2 2 25.00 50.00
Now what i want to do is total up the Totals so that i can display the subtotal of the order to the customer.
If this possible to do by changing the above SQL statement?
Thanks Hooks
Last edited: