Hey all I am trying to combine my data into one sum. This is my output right now:
Amount
---------
$258.0
$400.0
$1011.0
$628.0
$628.0
$340.0
$340.0
$1764.0
of course the total would be $5369. This is the type of output I need
Description | Quantity | Price | Amount
--------------------------------------------
Fees 8 $1.50 $12.00
Redep $5369.00
$5381.00
Only information above I would really need is the 8, 12, 5369.00 and 5381.00.
And this is my query to get those values I first posted:
SELECT '$' + CONVERT(varchar(50),round((CONVERT(int,Points) * .1),0)) AS 'Amount'
FROM tblHGP HGP,
OrderDetails OD,
tblInvoices i
JOIN tblCS cs ON i.INumber = cs.INumber
JOIN tblECI ac ON i.INumber = ac.INumber
WHERE cs.SoldTo = HGP.ECard
AND issued BETWEEN '2010-09-01' AND '2010-09-30 23:59:59'
AND Country = 'US'
AND HGP.iNumber = OD.orderdetail
ORDER BY issued