I have a table:
create table Transactions(Tid int,amt int)
With 5 rows:
insert into Transactions values(1, 100) insert into
If you use version 2012, here is a solution
select *, sum(amt) over (order by Tid) as running_total from Transactions
For earlier versions
select *,(select sum(amt) from Transactions where Tid<=t.Tid) as running_total from Transactions as t