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

Query of queries problem or bug

New Here ,
Feb 08, 2007 Feb 08, 2007

Copy link to clipboard

Copied

Hello Everyone,

I have used cfdirectory to get a list of files. As the result I receive query with the files.
Then I want to search it using query of queries. I' ve found a problem and I wonder if it is a bug of Coldfusion or perhaps wrong usage of QoQ. The thing is that the files that I have are using '_' and then are followed by number of week. It seems that searching something like this '%_6' returns results *_*6. See attached code.

Thanks for all answers in advance.

TOPICS
Advanced techniques

Views

363

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 ,
Feb 08, 2007 Feb 08, 2007

Copy link to clipboard

Copied

I think you'll find "_" is a single-char wildcard when used with the LIKE
operator.

--
Adam

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 ,
Feb 08, 2007 Feb 08, 2007

Copy link to clipboard

Copied

LATEST
Thanks for the answer Adam.

Regards,
Rafal

This version of QoQ does what I want:

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
LEGEND ,
Feb 08, 2007 Feb 08, 2007

Copy link to clipboard

Copied

> I think you'll find "_" is a single-char wildcard when used with the LIKE
> operator.

Found out how to escape it:

WHERE Name LIKE '%[_]6%'

I'm glad you brought this up... I didn't know about this until I looked @
your issue. That's my new thing learned for the day: I can go to the pub
now ;-)

--
Adam

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