you didn't say which db you are using, but with MySQL you have a GROUP BY ... WITH ROLLUP option (if i remember correctly).
Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ Mark Townsend wrote: > Hello. Say I have a table with the following data: > > Acct#, Name, Cost > 001, Bennett, 50.00 > 001, Bradley, 250.00 > 001, Green, 200.00 > 420, Smith, 50.00 > 420, Cummings, 50.00 > 470, Brown, 80.00 > > I would like the output to be like: > > 001-6405 > Bennett 50.00 > Bradley 250.00 > Green 200.00 > Total 001 500.00 > > 420-6405 > Smith 50.00 > Cummings 50.00 > Total 420 100.00 > > 470-6405 > Brown 80.00 > Total 470 80.00 > > Total Accts 680.00 > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315399 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

