Here is my SQL statement:
I need it to take the OrdNo (order #'s) and output the total amount by multiplying the price types the quantity ordered (TotalAmount). Right now it displays each individual order instead of combining them. If one order includes a $15 item and a $10 item, it displays the two items seperately instead of display the one order number with a total of $25.
What am I doing wrong?
Code:
SELECT OrderTbl.OrdNo, OrdDate, OrdName, (ProdPrice * Qty) AS TotalAmount
FROM OrderTbl, Customer, OrdLine, Product
WHERE OrderTbl.OrdNo = OrdLine.OrdNo
AND Product.ProdNo = OrdLine.ProdNo
AND Customer.CustNo = OrderTbl.CustNo
AND OrdDate = #1/23/2004#
I need it to take the OrdNo (order #'s) and output the total amount by multiplying the price types the quantity ordered (TotalAmount). Right now it displays each individual order instead of combining them. If one order includes a $15 item and a $10 item, it displays the two items seperately instead of display the one order number with a total of $25.
What am I doing wrong?