>I have a field called DollarAmt on a report, along with a running total of DollarAmt into a field called Ord_Tot:
>
> DollarAmt Ord_Tot
>
> 659.75 659.75
> 9,566.20 10,225.95
> 3,380.00 13,605.95
> 3,450.00 17,055.95
>13,316.00 30,371.95
>
>
>
>How do I create this running total in a query?
Glad you asked. I knew it, give me a sec.
http://www.sqlteam.com/article/calculating-running-totalsI solved this problem myself on the interview, but I forgot my own solution (think it was 2).
Just google "Running Total SQL Server" and you'll find plenty of articles.
If it's not broken, fix it until it is.
My Blog