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 |
|
de9625
Starting Member
17 Posts |
Posted - 2002-08-16 : 11:15:59
|
| What I want do is a accumulated budget.The first question:SELECT PERIOD, SUM(BUDGET)FROM SALESBUDGETGROUP BY PERIODThen I get a record set with 2 colums and 12 rows (one for each month)Now I want to transform this budget in to an accumulated budget...January = JanuaryFebruari = January + FebMars = Jan + Feb + Maretc...Should I do this with a temp table and/or with cursors or is there a function in SQLServer for this type of problem? I have read somewhere that u should stay away from cursor if u can..? Could anyone give me a hint on what to do? |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
|
|
|
|
|