Hi All,
I have a Table with 3 columns
SalesPID SalesAmount DiscountAmount
12 120 20.00
13 130 30.00
14 140 40.00
I Need An Output Table like the Following table which contains extra column with name RunningTotals which is sum of currentRow discountAmount and Previous row of RunningTotal Value.Is it Possible to fill a temporary table or tableVariable or commonTableExpressions or using any other statements without using cursor or looping statements.
SalesPID SalesAmount DiscountAmount Running Totals
12 120 20.00 20.00
13 130 30.00 50.00
14 140 40.00 90.00
Awaiting Your Valuable Inputs
Thanks and Best Regards,
Rajesh