在您的澄清之后,如果您真的必须在查询本身中完成所有这些操作,我认为您需要类似的东西。
DECLARE @Points float, @Qty int
SELECT @Points = SUM(Points), @Qty = COUNT(*)
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
SELECT [Description],Quantity,Price, Amount
FROM
(
SELECT 1 AS OrderBy, 'Fees' AS [Description],@Qty AS Quantity, 1.50 AS Price , 1.5*@Qty AS Amount
UNION ALL
SELECT 2 AS OrderBy, 'Redep' AS [Description],NULL AS Quantity, NULL AS Price , @Points AS Amount
UNION ALL
SELECT 3 AS OrderBy, NULL AS [Description],NULL AS Quantity, NULL AS Price , @Points + 1.5*@Qty AS Amount
) D
ORDER BY OrderBy