Mike,
What you are looking at is probably what in CF world is called a "query of
queries".
Does the CFQUERY tag look like this?
<cfquery name="foo" dbtype="query" >

This is a built in feature in CF that allows you to run a query against a
result from another query.
So qryGetVisitRecords is probably the name of another query you have above
this one...

Hope this helps! :)

--Ken


On Mon, Dec 6, 2010 at 4:19 PM, mike barnes <[email protected]> wrote:

> Hi everyone,
>
> I am new to Cold Fusion and have been tasked with maintaining an existing
> application and am having a little trouble following the code.
>
> Specifically, I am unable to understand the following cfquery snippet and
> how the from clause is figuring out what the table is:
>
> ------------------- Code below ---------------------
> SELECT *
> FROM qryGetVisitRecords
>  <cfif form.assigned_month_filter neq "" and not listFind("asc,desc",
> form.assigned_month_filter)>
> , qryGetAssignedMonths
>  WHERE qryGetAssignedMonths.sitecompany_id =
> qryGetVisitRecords.sitecompany_id
> ----------------------------------------------------------
>
> The issue is that I do not have a qryGetVisitRecords table or view. Also,
> do not have a qryGetAssignedMonths table or view. So, the question is where
> to I find how the query is calculating the table name. And, is there a way
> to trap the sql statement so that I can visually inspect it.
>
>
> Thanks
> Mike Barnes
>
>

Reply via email to