Yeah, that makes sense...

I didn't realize that the query name "getNEQnum" was
different from the looped query name "getEQnum".  I thought
they were the same, so I thought the query was being referenced
within itself.

Thanks for the explanation, Dominic!

Rick

> -----Original Message-----
> From: Dominic Watson [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 09, 2008 5:55 PM
> To: CF-Talk
> Subject: Re: QoQ question - left outer join
> 
> >
> > 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
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:303076
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to