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 |
|
Vishakha
Starting Member
40 Posts |
Posted - 2006-12-17 : 06:05:38
|
| I have 12 rows in my table, indicating each month of the year.I need to output an aggregate column for each row which is the sum of previous month's i.e rows data.Any idea how can I do this.Table structurejan val01 val02 feb val11 val12...dec val.. val..I want the output asjan val01 val02 -feb val11 val12 (val01 + val02)mar val21 val22 (val11 + val12)apr val31 val32 (val21 + val22)... |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-12-17 : 10:38:28
|
| Does your table have any Identity column? primary key?Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
Vishakha
Starting Member
40 Posts |
Posted - 2006-12-17 : 11:29:48
|
| it has a month column for each monthactually it is a view that I have created. and view has one column for month. |
 |
|
|
|
|
|