I offer the following if its any use to you. Although swampBoogie has offered an easier approach by indexing your data.
Obviously row_name,table_name need to be changed
CREATE TABLE #Temp_Cumulative_Table (row_name numeric, RunningTotal numeric)
DECLARE @row_name numeric,
@RunningTotal numeric
SET @RunningTotal = 0
DECLARE Cumulative_Cur CURSOR
FOR
SELECT row_name
FROM table_name
OPEN Cumulative_Cur
FETCH NEXT FROM Cumulative_Cur INTO @row_name
WHILE @@FETCH_STATUS = 0
BEGIN
SET @RunningTotal = @RunningTotal + @row_name
INSERT #Temp_Cumulative_Table VALUES (@row_name,@RunningTotal)
FETCH NEXT FROM Cumulative_Cur INTO @row_name
END
CLOSE Cumulative_Cur
DEALLOCATE Cumulative_Cur
SELECT * FROM #Temp_Cumulative_Table
DROP TABLE #Temp_Cumulative_Table