SELECT 1 as tp,rdate,indamount FROM reserve WHERE claim_id between 49142 AND 49162This gets the total:
SELECT 9 as tp,{} as rdate,SUM(indamount) FROM reserve WHERE claim_id between 49142 AND 49162now union this and orde by tp first which will put the total to the bottom:
SELECT 1 as tp,rdate,indamount FROM reserve WHERE claim_id between 49142 AND 49162; union; SELECT 9 as tp,{} as rdate,SUM(indamount) FROM reserve WHERE claim_id between 49142 AND 49162should give something like (partial list <g> :
Tp Rdate Indamount 1 03/19/04 12300.00 1 03/31/04 -19990.00 1 03/31/04 17991.00 1 05/06/04 -46000.00 1 05/07/04 -1.00 1 06/10/04 0.00 1 06/23/04 -19841.00 1 06/23/04 0.00 1 07/02/04 -3500.00 1 07/28/04 -5000.00 9 / / 164432.00 <----totalif you have a character field you can set int to say 'Total'....