No, you can use CFQUERYPARAM

<cfset myList="203,197">

<cfquery name="myQuery" datasource="#DSN#">
select *
from myTable
where
        salesPersonID IN (<cfqueryparam cfsqltype="CF_SQL_VARCHAR"
value="#myList#" list="Yes" separator=",">)
</cfquery>

> -----Original Message-----
> From: Robert Everland [mailto:REverland@;dixonusa.com]
> Sent: Friday, November 01, 2002 3:16 PM
> To: CF-Talk
> Subject: Cfqueryparam and IN
> 
> 
> I have a query that I had been just comparing one value so I 
> could use a
> cfqueryparam of varchar, now that same variables may be 
> passing something
> like 203,197 meaning that a sales rep belongs to each of 
> those groups. So I
> need to change my query to something IN ('203','197') , but 
> cfqueryparam
> doesn't let me do this. Do I need to use something else 
> besides cfqueryparam
> or is there a setting I am not seeing that will allow me to 
> use cfqueryparam
> and this?
> 
> Robert Everland III
> Web Developer Extraordinaire
> Dixon Ticonderoga Company
> http://www.dixonusa.com 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to