I have a table in sql serevr,which has one column and its storing integer values.
Ex : ColumnData
100
150
20
25
300
Now by using this data i want the result as shown below.
columndata NewColumn
100 100
150 250
20 270
25 295
300 595
so in the output newcolumn is added by the logic i.e first row data as firstrow,then first two rows addition result as appears in second row,then first three rows addition result as appears in third row like so on...
could any one please provide me the query how to get my result.
Thanks In Advance,
Phani Kumar.