I'm using MSAccess.

So now I use dthe # and # 
And I get this error:

Error resolving parameter CLOSE_DATE

I changed the where clause to:

#datediff('d',close_date, now())# > = 5

Now like I said before, Close_Date IS a field in the database..and it IS a DateTime 
field.


This is the whole query.

<CFQUERY name="GetExpiredBids" datasource="#DSN#">

        Select close_date,bidid From tblBids 
        
        WHERE #datediff('d',close_date, now())# > = 5


</CFQUERY>

I think I am making some little mistake somewhere..but I don't know what..:-\


-Gel





-----Original Message-----
From: Duane Boudreau [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, November 19, 2002 3:58 PM
To: CF-Community
Subject: RE: Using DateDiff within SQL..


if you are using SQLServer you can use

WHERE datediff('d',close_date, getdate()) > = 5

You cant use CF functions directly in SQL statements unless you use the # symbols

HTH,
Duane

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=5
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=5
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5

Reply via email to