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

(#ListQualify(MyMultiPickValue, "'")#)

New Here ,
Apr 30, 2007 Apr 30, 2007

Copy link to clipboard

Copied

I am trying to search a field based on a multi pick drop down search search. This works really well when the has the exact value in it. But is there a why yo do this while adding wild cards on.

For example this search

<CFQUERY Name="GetData" datasource="MyDataSource">
SELECT *
FROM Tagging
WHERE Tagging.TagName IN (#ListQualify(MyMultiPickValue, "'")#)
</CFQUERY>

may look like

SELECT *
FROM Tagging
WHERE Tagging.TagName IN (african,american)#)

it will pull up all records with africa and american but not records with like south american or souch africa

in a normal query you can fix this by adding %

like

AND Tagging.TagName LIKE '%#MyMultiPickValue#%'

is there any way to put a while card of the search value for this query ?

<CFQUERY Name="GetData" datasource="MyDataSource">
SELECT *
FROM Tagging
WHERE Tagging.TagName IN (#ListQualify(MyMultiPickValue, "'")#)
</CFQUERY>


thanks for your help in this matter
m
TOPICS
Advanced techniques

Views

177

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 ,
Apr 30, 2007 Apr 30, 2007

Copy link to clipboard

Copied

expect this to be slow.



select JustTheFieldsYouNeed
from tagging
where 1 = 1
and
(
<cfloop list = MyMultipickList index = "ThisItem">
tagname like '%ThisItem%'
or
</cfloop>
1 = 2
)

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 ,
May 04, 2007 May 04, 2007

Copy link to clipboard

Copied

LATEST
thanks that did it 🙂

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