Want to add rows values to show in a new row

Nov 3 2011 2:15 AM
Hi

I have a problem, I want to add the rows values.
I have rows in table like
        Months          Values
        Jan-2010        5
        Feb-2010        10
        Mar-2010        7
        Apr-2010        2
Logic for the result:
Jan-2010        - 5
Feb-2010        -15  (Jan-2010 + Feb-2010)       
Mar-2010        -22  (Jan-2010 + Feb-2010 + Mar-2010)
Apr-2010        -2    (Jan-2010 + Feb-2010 + Mar-2010 + Apr-2010)
I want results set like this
        Months        Values
        Jan-2010        5
        Feb-2010        15
        Mar-2010        22
        Apr-2010        24     

Pls help on urgent basis
Thanks in Advance
Regards
Anurag

Answers (5)