Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Accumulate Data

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-10-09 : 07:59:23
Art writes "I used sqlserver 2000 and need accumulate data
I have attach data as below

Id Date Total
6001223 2003-10-01 00:00:00.000 10
6001223 2003-11-01 00:00:00.000 10
6001223 2003-12-01 00:00:00.000 10


How I accumulate the total for new column like


Id Date Total Acc
6001223 2003-10-01 00:00:00.000 10 10
6001223 2003-11-01 00:00:00.000 10 20
6001223 2003-12-01 00:00:00.000 10 30

Please help

Regards,
Sittidach Tansongcharoen"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-10-09 : 07:59:58
You're looking for a running total:

http://www.sqlteam.com/item.asp?ItemID=3856
Go to Top of Page
   

- Advertisement -