Hey Mike,

With query of queries, you only have available to you what was returned from
the main query (both in terms of columns and rows).

To figure out where your loosing records, two cfdump's may be the quickest
way (though a pain if the rowset is really large). For example, if query X
 is a normal DB query and query Y is a QoQ that uses X as its source (so the
sql for Y has "... FROM X WHERE...), dumping both will let you know if
records are missing as a result of the SQL in X or the sql in Y.

"what does CF use to substitute this part of the query" CF doesn't know
anything about the underlying DB structure of the objects queried - it just
is querying an array of structures with identical keys (for example you can
create your own array of structs and use if in the from clause of a QoQ).

Hope that helps!


On Tue, Dec 7, 2010 at 7:38 AM, mike barnes <[email protected]> wrote:

> The answer to everyones question is yes, the dbtype is "query". So, how do
> does one debug this query of queries, since it appears to not be getting all
> of the records. Basically, what I would like to do is see what the
> underlying sql statement is; so, that I can map back to the database (or is
> this possible). Also, not sure what debugging tools I have available to me.
>
> What makes this query of queries confusing is the fact that the from
> statement does not represent a table or view, so, what does CF use to
> substitute this part of the query, is it all of the tables from the "main"
> query?
>
> Thanks
> Mike Barnes
>
> On Mon, Dec 6, 2010 at 5:44 PM, John Youngman <[email protected]>wrote:
>
>> Good tip,
>>
>> and dont forget to look in any cfm templates that are used in <cfinclude>
>> tags that may lie above the query in question.
>>
>> Good luck!! :D
>>
>>  __________________________
>> John Youngman
>> [email protected]
>> http://www.linkedin.com/in/johngyoungman
>>
>>
>>
>>
>>
>> On Dec 6, 2010, at 5:38 PM, Teddy R. Payne wrote:
>>
>> *chuckle*
>>
>> As you can see, several people are on the same train of thought here.
>>
>> Another way in the future to try and figure out context of code is to
>> do some global searches for keywords like "qryGetVisitRecords".  This
>> could provide some code insight as to where the original query exists
>> and how often it is being referenced.  When you cannot find code, then
>> you need to expand your searches to the interfaces to the application.
>> This could be in many forms to include databases, webservices, ...etc
>> where either data access or other code logic could reside.
>>
>>
>> Happy Hunting!
>>
>> Teddy R. Payne, ACCFD
>> Google Talk - [email protected]
>>
>>
>> -------------------------------------------------------------
>> To unsubscribe from this list, manage your profile @
>> http://www.acfug.org?fa=login.edituserform
>>
>> For more info, see http://www.acfug.org/mailinglists
>> Archive @ http://www.mail-archive.com/discussion%40acfug.org/
>> List hosted by http://www.fusionlink.com
>> -------------------------------------------------------------
>>
>>
>>
>>
>>
>>
>

Reply via email to