Running Total Problem | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Running Total Problem

Hi there – I hope someone can help me with this problem : Suppose I have the following info : Group Amt Detail
————————————–
A
1000 1
1000 2
1000 3
B
2000 4
2000 5
2000 6
————————————— I can get aggregates at group level by using First(Fields!Amt.value) and Sum(Fields!Detail.value) in the group footer.
But if I want an overall sum of Amt at the table footer, then Sum(Fields!Amt.value) will give me a value of 9000 rather than the 3000 I want. How do I get 3000? Many thanks in advance for any help. SteveB.
Hi,
are u looking for this ?!
From BOL : SELECT type, price, advance
FROM titles
WHERE type LIKE ‘%cook’
ORDER BY type
COMPUTE SUM(price), SUM(advance) BY type
Regards Hemantgiri S. Goswami
[email protected]
"Humans don’t have Caliber to PASS TIME , Time it self Pass or Fail Humans" – by Hemantgiri Goswami

]]>