Answered
Query Of Queries
I'm having some trouble with Query of Queries in CF5. I have
included my select statement in the attached code.
What I'm looking to be able to do now is select totals from the original query using a Query of Queries. For example, I need to know my total return visitors as compared to my total new visitors (for the sake of the query, a new visitor is anyone whose FirstVisitDate falls within whatever date range the user has specified [attributes.start to attributes.end] and a return visitor is anyone whose FirstVisitDate does nto fall within the specified range.
I have tried something like:
<cfquery dbtype="query" name="GetNewHits">
Select Count(Visitor)
From QueryVisitors
Where FirstVisit
Between #attributes.start#
and #attributes.end#
</cfquery>
The above query (when it returns results at all) returns a count of all of the records within the original query (to me it seems like it doesn't recognize the field FirstVisit as a date field). Can anyone offer any suggestions? Thanks,
--Daniel Casper
What I'm looking to be able to do now is select totals from the original query using a Query of Queries. For example, I need to know my total return visitors as compared to my total new visitors (for the sake of the query, a new visitor is anyone whose FirstVisitDate falls within whatever date range the user has specified [attributes.start to attributes.end] and a return visitor is anyone whose FirstVisitDate does nto fall within the specified range.
I have tried something like:
<cfquery dbtype="query" name="GetNewHits">
Select Count(Visitor)
From QueryVisitors
Where FirstVisit
Between #attributes.start#
and #attributes.end#
</cfquery>
The above query (when it returns results at all) returns a count of all of the records within the original query (to me it seems like it doesn't recognize the field FirstVisit as a date field). Can anyone offer any suggestions? Thanks,
--Daniel Casper
