Skip to main content
Participating Frequently
September 20, 2007
Question

Problem with listQualify

  • September 20, 2007
  • 2 replies
  • 458 views
I have a dropdown list box on the form page that is populated with a number of units, some single words, some multiple words with spaces and some contain commas like this: AUG,ABN BCT

I am using MS SQL Server200 and when I pass in the list to run the query I'm using listQualify in the where clause
like this: and unit in (#listQualify(units,"'")#)

It will not find the units that the user selected that have a comma in them.

How can I fix this?
This topic has been closed for replies.

2 replies

Participating Frequently
September 21, 2007
Thanks for the reply.

However, cfqueryparam isn't helping.

I need a comma delimited list for the where clause but sometimes the list
values contain a comma within it. So when the query runs it separates AUG
from ABN BCT because there is a comma in it. I need the query to see
‘AUG,ABN BCT’ as a single list value.
Inspiring
September 20, 2007
A <cfqueryparam value="#units#" list="yes"...> tag? It handles the
qualification for you.

Check the actual formated SQL sent to the database with any of the
available debugging features?