I'm trying to do a query of queries like so:

68:     <cfquery name="getData" dbtype="query">
69:             SELECT * from myQuery
70:             WHERE myStart BETWEEN
71:             (<cfqueryparam cfsqltype="CF_SQL_TIMESTAMP"
value="#DateAdd('D',iCount-1,startDate)#"> and
72:             <cfqueryparam cfsqltype="CF_SQL_TIMESTAMP"
value="#DateAdd('D',iCount,startDate)#">)
73:             AND myStart >=
#createDateTime(Year(getEarlierData.skedDate),Month(getEarlierData.skedDate)
,Day                                    (getEarlierData.WScdDate),0,0,1)#
74:     </cfquery>

***Here's the error I get:

Query Of Queries syntax error.
Encountered "myStart >= {" at line 0, column 0. Incorrect conditional
expression, Expected one of [like|null|between|in|comparison] condition,

The error occurred in [this file]: line 73

71 :            <cfqueryparam cfsqltype="CF_SQL_TIMESTAMP"
value="#DateAdd('D',iCount-1,startDate)#"> and
72 :            <cfqueryparam cfsqltype="CF_SQL_TIMESTAMP"
value="#DateAdd('D',iCount,startDate)#">
73 :            AND myStart >=
#createDateTime(Year(getEarlierData.skedDate),Month(getEarlierData.skedDate)
,Day(getEarlierData.skedDate),0,0,1)#
74 :    </cfquery>

***Here is the query its trying to do:

SELECT * from myQuery WHERE myStart BETWEEN (param 1) and (param 2) AND
myStart >= {ts '2003-08-01 00:00:01'}

The variable myStart is in the {ts '2003-08-01 00:00:01'} format earlier in
the code.

Is it that I can't perform this kind of comparision in QofQ?  Should I
convert the date using datediff or some other function?

Thanks!

/Keith



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Reply via email to