yamaharuss
02-18-2009, 09:56 AM
I'm trying to get a total sum of the following items
Item1 has a qty of 2 with price of $100
Item2 has a qty of 1 with price of $1
So the SUM I am looking for from my query would be $201 but my query is only returning $200. It's not grabbing the next record row
SELECT OI.OrderItemID,OI.ItemID,OI.Name,OI.ItemCode,OI.Options,OI.OptionsPrice,OI.ItemPrice,OI.Quantity, I.VendorID, Sum(ItemPrice*Quantity) AS iSubtotal FROM C_OrderItems OI INNER JOIN C_Items I ON I.ItemID = OI.ItemID WHERE OrderID=11682 GROUP By OI.OrderItemID,OI.ItemID,OI.Name,OI.ItemCode,OI.Options,OI.OptionsPrice,OI.ItemPrice,OI.Quantity, I.VendorID
What am I missing?
Item1 has a qty of 2 with price of $100
Item2 has a qty of 1 with price of $1
So the SUM I am looking for from my query would be $201 but my query is only returning $200. It's not grabbing the next record row
SELECT OI.OrderItemID,OI.ItemID,OI.Name,OI.ItemCode,OI.Options,OI.OptionsPrice,OI.ItemPrice,OI.Quantity, I.VendorID, Sum(ItemPrice*Quantity) AS iSubtotal FROM C_OrderItems OI INNER JOIN C_Items I ON I.ItemID = OI.ItemID WHERE OrderID=11682 GROUP By OI.OrderItemID,OI.ItemID,OI.Name,OI.ItemCode,OI.Options,OI.OptionsPrice,OI.ItemPrice,OI.Quantity, I.VendorID
What am I missing?