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?
Ian Skinner - 20 Sep 2007 21:10 GMT
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?
EndoplasmicReticulum - 21 Sep 2007 12:46 GMT
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.