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.
Author |
Topic |
mkdlmr
Starting Member
21 Posts |
Posted - 2013-12-18 : 21:15:10
|
How can I update a table to have a running cumulative sum?
For Example:
Update Table1 Set Cumulative_Sum = Row_Sum + Previous_Row_Sum
It should look something like this:
Row_Sum Cumulative_Sum 1 1 2 3 3 6 4 10
Thanks, Mark |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
|
|