I am not even making it that far. I am getting an error on <cfloop query="qry2"> stating that qry2 is not a recordset. If I do a <cfdump prior to the first loop, qry2 is a recordset with several rows of data. If I do a <cfdump right before the second loop (i.e. inside the outer loop), then qry2 is null. For some reason the variable is just gone.
Thanks -----Original Message----- From: Zac Spitzer [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 04, 2002 8:23 AM To: CF-Talk Subject: Re: Nested Query Loops Jeff D. Chastain wrote: > I was referring to the inner query using the full scoped name - > variables.queryName. > > So, why does setting newQueryName = variables.queryName PRIOR to > looping the first query change anything? Both variables are in the > variable scope and are created prior to the first loop - they should > be the same right? cf loses track of the currentrow when nesting, you need to track it, ie <cfloop query="qry1"> <cfset qry1_row=qry1.currentrow> <cfloop query="qry2"> <cfoutput>#qry1.name[qry1_row]# #qry2.name#</cfoutput> </cfloop> </cfloop> z ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm