Why the 2 queries? How about this? <CFQUERY NAME="qSpecificLocations" DATASOURCE="Events"> SELECT DISTINCT EventID,EventType,X,Y,EventText FROM Events </CFQUERY>
<CFOUTPUT QUERY="qSpecificLocations"> #qGroups.CurrentRow#, #qSpecificLocations.CurrentRow#, #qSpecificLocations.X#, #qSpecificLocations.Y# </CFOUTPUT> It's not exactly clear what you're trying to do but if this isn't quite right you can probably get what you want by adding a group attribute to the cfoutput. </rob> -----Original Message----- From: Bosky, Dave [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 16, 2002 2:29 PM To: CF-Talk Subject: Query Trouble Can someone point out why this query is only getting the last group of records? A second set of eyes would really help! If the query qGroups returns the following eventtypes: ItemA, ItemB, ItemC Only group ItemC and records that are in ItemC will print out. ------------------------------ <CFQUERY NAME="qGroups" DATASOURCE="Events"> SELECT DISTINCT EventType FROM Events </CFQUERY> <CFOUTPUT QUERY="qGroups"> <CFQUERY NAME="qSpecificLocations" DATASOURCE="Events"> SELECT EventID,EventType,X,Y,EventText FROM Events WHERE EventType = '#qGroups.EventType#' </CFQUERY> <CFIF IsDefined("qSpecificLocations.RecordCount") AND qSpecificLocations.RecordCount GTE 1> <CFLOOP QUERY="qSpecificLocations"> #qGroups.CurrentRow#,#qSpecificLocations.CurrentRow#,#qSpecificLocations.X#, #qSpecificLocations.Y#); </CFLOOP> </CFIF> </CFOUTPUT> ------------------------------ Thanks, Dave ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

