• Have a million row table and do running total using a triangular join

    select col,

    (select sum(col) from table as t1 where t1.pkcol<=t2.pkcol) as run_sum

    from table as t2


    Madhivanan

    Failing to plan is Planning to fail