Well, I think you've put me on the right track, so thank you very much. I'm going to read up on "CFLOOP" in the book.
Thanks again. Dave Long NorthGoods Merchant Services http://www.northgoods.com Maybe not the most efficient way but you can loop through the GetCategories query and within each iteration of the loop get the associated product count using another query. Not tested but this should work: <cfloop query="GetCategories"> <cfquery name="GetProducts" datasource="XYZ"> SELECT Products.ID, Products.CATEGORY FROM products WHERE Products.CATEGORY = #GetCategories.Categories.ID# </cfquery> <cfoutput>GetCategories.CATEGORY ( #GetPorducts.RecordCount # )</cfoutput> </cfloop> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349226 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm