You can try using data object instead of a string formatted as a date. I 
think the column in your query is of type string.

Bye
Gualtiero

----- Original Message ----- 
From: "Mark Lewis" <[EMAIL PROTECTED]>
To: "CF-Talk" <cf-talk@houseoffusion.com>
Sent: Monday, July 30, 2007 1:43 PM
Subject: Query of Queries date comparison


> Hi,
>
> Wondered if someone could advise on this problem I am having.
>
> I have created a query as shown below...
>
>
> <cfset event = QueryNew("date, name, destination", "date, varchar, 
> varchar")>
>
> <cfset newRow = QueryAddRow(event, 2)>
>
> <cfset temp = QuerySetCell(event, "date", 07/28/2007, 1)>
> <cfset temp = QuerySetCell(event, "name", "trip to zoo", 1)>
> <cfset temp = QuerySetCell(event, "destination", "london", 1)>
>
> <cfset temp = QuerySetCell(event, "date", 07/31/2007, 2)>
> <cfset temp = QuerySetCell(event, "name", "trip to zoo", 2)>
> <cfset temp = QuerySetCell(event, "destination", "london", 2)>
>
>
> I would like to run a query on this query where it finds only the records 
> where the date is greater than today.
>
> I have written the following...
>
>  <cfquery name="search" dbtype="query">
>   SELECT *
>   FROM event
>   WHERE date > #DateFormat(Now(),"mm/dd/yyyy")#
>  </cfquery>
>
> However I get an error returned
>
> "Query Of Queries syntax error.
> Encountered "date. Incorrect conditional expression, Expected one of 
> [like|null|between|in|comparison] condition, "
>
> Does this mean I cannot use this greater than ( > ) clause on a query of 
> queries, I have searched for some documentation but couldnt find any. I f 
> anyone knows where any could be posted on the web, or a solution to this 
> problem that would be great.
>
> Thank you in advance
>
> Mark
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284786
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to