> > The loop seems to be acting as a means of reading the value of > '#Material#' for current query row. Would that be accurate?
Nope ;). Think of cfquery as a kind of custom cfoutput tag and the outputted content between the tags as plain text. First of all, the cfquery tag evaluates the output between the cfquery tags as a 'query string'. Only THEN does it send that resultant string to the DB server or the QoQ engine to be processed. So, in this case, if there were three records in that 'inner loop', the query string sent to the QoQ engine might look like this: Cfquery code: > <cfquery name="getNEQnum" dbtype="query"> > SELECT getZMA.Material > FROM getZMA > WHERE (1 = 1 > <cfloop query="getEQnum">AND getZMA.Material <> '#Material#'</cfloop>) > </cfquery> > Resulting query string sent to QoQ 'engine' / Database server: > SELECT getZMA.Material > FROM getZMA > WHERE (1 = 1 > AND getZMA.Material <> 'straw' > AND getZMA.Material <> 'wood' > AND getZME.Material <> 'bricks') > Hope that makes sense, Dominic -- Blog it up: http://fusion.dominicwatson.co.uk ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303071 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

