Why not just one WHERE clause without the commas? It would still catch any item 
within the delimited list:


emaildates like '%#todaysDate#%'

That would catch any of the dates


 

-----Original Message-----
From: Damien McKenna [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 05, 2007 9:22 AM
To: CF-Talk
Subject: Re: OT: Easy SQL Question

On 1/5/07 9:01 AM, Che Vilnonis wrote:
<cfquery name="getScheduledEmails" datasource="#DSN#"> SELECT esid, emailtype, 
emaildates, filterdomains, emailsubject, emailbody, timessent FROM 
EmailScheduler WHERE
    emaildates like '%,#todaysDate#,%'
    or emaildates like '#todaysDate#,%'
    or emaildates like '%,#todaysDate#'
ORDER BY esid
</cfquery>

Because you don't have commas on both sides of each date you have to search for 
entries that don't have a comma on one side or the other, hence three WHERE 
clauses.

--
Damien McKenna - Web Developer [EMAIL PROTECTED] The Limu Company - 
http://www.thelimucompany.com/ - 407-804-1014 #include <stdjoke.h>






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

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

Reply via email to