database MS SQL 2005i have a table having columnsAutoid AccountId Debit Credit Total running_totalThe Following select Query which Gives me result for running totals.SELECT n.AutoId, --n.order_total, SUM(o.Linetotal) As running_totalFROM (SELECT AutoId, SUM(total) As Linetotal FROM Tb_AccountLedger WHERE ACCOUNTID = 1693 GROUP BY AutoId ) n INNER JOIN (SELECT AutoId, SUM(total) As Linetotal FROM Tb_AccountLedger WHERE ACCOUNTID = 1693 GROUP BY AutoId ) o ON (n.AutoId >= o.AutoId)GROUP BY n.AutoIdORDER BY n.AutoiD
but i want the running field to be updated according to this query as i dnt want to run this query every time the user access. i dnt wana use any loops already done tht its too slow thx in advance