Try:

<cfset testdate=DateFormat("01-01-2002","mm/dd/yy")>
<cfquery name="SpotsQuery" dbtype="query">
        SELECT BESTNUMBER, SPOTSTART FROM application.allquery WHERE
((SPOTSTART >= #CreateODBCDate(Testdate)#


Date fields don't normally need quotes in the SQL statement


Best regards,

Dennis Powers
UXB Internet
(203)879-2844
http://www.uxbinfo.com/

-----Original Message-----
From: Admin [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 24, 2001 10:01 AM
To: CF-Talk
Subject: query of a query

I'm trying to retrieve a subset from a query cached in memory. I'm using
this query:

<cfquery name="SpotsQuery" dbtype="query">
        SELECT BESTNUMBER, SPOTSTART FROM application.allquery WHERE
((SPOTSTART >= '01-01-2002'

But I receive the error

Error: is not a valid date



I already tried a few different formats including createodbcdate etc but no
luck so far. Anyone here knows what does work, and maybe some extra tips for
working with this feature?


______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to