My bad.  That works in SQL Server I guess.

-----Original Message-----
From: Patrick Thomlinson [mailto:[EMAIL PROTECTED] 
Sent: Sunday, November 05, 2006 8:53 AM
To: CF-Talk
Subject: RE: Where Date Statement in MySQL

Try changing the "!=" in your query to "<>"

-----Original Message-----
From: Cornel Ivanescu [mailto:[EMAIL PROTECTED] 
Sent: Sunday, November 05, 2006 7:36 AM
To: CF-Talk
Subject: Re: Where Date Statement in MySQL

Tried multiple combinations of createOBDCdate() and CFQUERYPARAM with
CF_SQL_VARCHAR and it still does not work...I am missing something
elementary...removed the between clause and replaced it with 2
statements <= and >= 

<cfset startdate=#DateFormat(rsGetCustOrders.order_Date,'yyyy-mm-dd')#>

<cfset
enddate=#DateFormat(DateAdd("d",90,rsGetCustOrders.order_Date),'yyyy-mm-
dd')#>   
<cfquery name="Recordset1" datasource="#request.dsn#">    
SELECT * FROM tbl_picks    
Where LEFT(tbl_picks.Pick_SKU,4) != "0000" and tbl_picks.Pick_SKU !=
"FREE"    
and and ("LEFT(tbl_picks.Pick_SKU,10)" >= #createODBCDate(startdate)#
and "LEFT(tbl_picks.Pick_SKU,10)" <= #createODBCDate(enddate)#)
</cfquery> 

The Pick_SKU the first 10 char are the DATE 2006-11-03 followed by the
event and it is a string of up to 16 characters. Someone mentioned using
Convert() on the sql side and  I am wondering if you can give me an
example...since everytime I tried it gave me an error.

Any other ideas?
Cornel
 





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259217
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