The problem is I need an OR statement.

I.e. Where state = AZ OR state = CA OR ....

This is where I am getting stumped.

How do I use a dynamic "OR" statement?



>You don't need the loop. Try:
>
><cfset myStates = "AZ,CA,CO,FL,ID,NM,NV,OR,UT,WA">
>
><cfoutput><pre>
>       SELECT myField
>       FROM myQuery
>       WHERE State NOT IN (#ListQualify(myStates, "'")#)
></pre></cfoutput>
>
>Except get rid of the cfoutput's and pre's, they're just there just to look
>pretty.
>
>Adrian
>
>-----Original Message-----
>From: Torrent Girl [mailto:[EMAIL PROTECTED]
>Sent: 16 March 2006 19:11
>To: CF-Newbie
>Subject: Re: using Lists in Query
>
>
>Actually, this help me add the ' ' and , but I still need to know how to
>output the loop in the where clause.
>
>I can't get it to work right.
>
>
>
>
>
>>I found exactly what I needed at the following url:
>>
>>http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/functb17.htm#wp11078
>86
>>
>>SWEET! :)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:15:1715
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to