I have to disagree...looping over a query and repeatedly hitting the database instead of using one query and using CF grouping is a poor practice. It's what the GROUP attribute of CFQuery exists for. Why do 1+N trips to the database (where N is the number of records the first query returns) when 1 suffices?
-Joe On Tue, 15 Feb 2005 12:21:07 -0400, John Inferrera <[EMAIL PROTECTED]> wrote: > I guees it would boil down to server process. SQL Server will parse data > faster than ColdFusion, What "I" would do is use two queries: > > SELECT DISTINCT candidate.id AS canID > FROM candidate,job_detail_view > > WHERE X=X > > <cfoutput query="QUERYNAME1"> > > SELECT candidate.first_name + ' ' + candidate.last_name AS > candidate,candidate.email AS candidate_email > > FROM candidate,job_detail_view > > WHERE job_detail_view.job_id = 14508 AND candidate.id QUERYNAME1.canID > ORDER BY date > > <cfoutput>Records here</cfoutput> > Format all information in a table by DISTINCT ID from QUERYNAME1 > > </cfouput> > > If you have multiple rows and dates for ID's a DISTINCT SQL Statement most > likely won't work. > > Or you could do what Dave Francis stated and pull all records and use CF to > display it all. > > A page showing 50 records shopuld take no time at all to spit out. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:194828 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

