• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Problem with listQualify

New Here ,
Sep 20, 2007 Sep 20, 2007

Copy link to clipboard

Copied

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?
TOPICS
Advanced techniques

Views

405

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 20, 2007 Sep 20, 2007

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 21, 2007 Sep 21, 2007

Copy link to clipboard

Copied

LATEST
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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation