var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
I have this problem. I need make a sql statment (not a SP) for this:
Now, my output is:
1/2 15 (5+10)
1/3 35 (15+15)
any idea? in access can make this with a runningsum, but, in SQL 2000?
I found a solution, with a subqueris, example
select date, amount, O.amount
,(select sum(amount) from <myTable>
where date <= O.date)
from <myTable> O
sum(TBL2.Amount) as RunningSum
from [MyTable] TBL1
inner join [MyTable] TBL2 on TBL1.date >= TBL2.date
group by TBL1.date
there are a couple of different sources that say a cursor (horrors!) is actually more efficient that set-based in the case of running totals:
but I guess the fastest way is to do it in a CLR proc:
Thanks blindman and jezmine.
jezmine i read this link and tell to you. thanks again.