Yes, you need quotes around the values. You can use CF's ListQualify() function to do this for you.
However, this code appears to be part of a stored proc. If you are not using a stored proc, use the cfqueryparam with the list="yes" attribute. That will make it easier to code. Example: WHERE column IN (<cfqueryparam cfsqltype="TYPE" value="#value#" list="yes">) -----Original Message----- From: Tim Do [mailto:[EMAIL PROTECTED] Sent: Thursday, January 06, 2005 12:49 PM To: CF-Talk Subject: OT: SQL help I'm trying to do a filter for a list of varchars values. I would like it to work like this but using an "in" instead of "=" fieldname = case when @variable = '0' then fieldname else @variable end basically if the list is empty do nothing else check the list. also, do I need to format the comma delimited list of varchars to have single quotes around each value? Thanks, Tim ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189568 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

