Relational databases don't work that way. Either you have to return all the columns and have data duplication or you would have to have 2 result sets and match them up with ColdFusion. It is easier to let the database to the extra heavy lifting and return one data set with the duplicated information.
You could make multiple columns "address1", "address2", etc but that is considered really bad database design and isn't normalized. Steve -----Original Message----- From: Les Mizzell [mailto:lesm...@bellsouth.net] Sent: Friday, October 02, 2009 12:58 PM To: cf-talk Subject: Re: GROUP BY problem... Agha Mehdi wrote: > Why not just > <cfoutput query="" group="name"> > <b>#name#</b><br> > <cfoutput> > #area_name#, #office_name#<br> > </cfoutput> > > </cfoutput> I could - but it's way more complicated than that... This single query (example was simplified) is responsible for a number of pages... Case A: multiple results based on search params Case B: a single employee, along with their areas and offices My thinking - if I can get it correct in the query, then that's less data that has to be returned, sorted, whatever and thusly saves a few CPU cycles. Why return five copies of basically the same record if that's not needed, right? But, the cfoutput with a group does work. I just don't think it's the most efficient way of doing it. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326843 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4