Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

drminaker
New Contributor III

Wildmatch not working with an SQL connection

I'm trying to use a Wildmatch statement with an SQL data source and I can't figure out how to get it to work (with table files and/or CSV I don't have any problems), but I'm guessing with a SQL data source this works a bit differently...

I've tried everything I can think of. I also tried adding this after the FROM statement in the SQL SELECT and I get an error that the function is not recognized -- I'm guessing it's looking for a SQL statement there?

Any is help much appreciated. Thanks!

wildmatch.png

1 Solution

Accepted Solutions
MVP
MVP

Re: Wildmatch not working with an SQL connection

I don't see any syntax errors above, do you know if in its current form (as in the image posted above), does it throw error or does it not give you the output you are expecting?

You can also try this, but not sure if those will make any difference

Where AccountType Like '*A*' or AccountType Like '*B*' or AccountType Like '*C*';

5 Replies
MVP
MVP

Re: Wildmatch not working with an SQL connection

I don't see any syntax errors above, do you know if in its current form (as in the image posted above), does it throw error or does it not give you the output you are expecting?

You can also try this, but not sure if those will make any difference

Where AccountType Like '*A*' or AccountType Like '*B*' or AccountType Like '*C*';

drminaker
New Contributor III

Re: Wildmatch not working with an SQL connection

Hi Sunny,

Apologies for the late reply. Thanks for the sanity check that the syntax was correct. It helped me troubleshoot back a little further and I realized it was a combination of some fields that I had aliased and a very slow data load.

Another question for you, if you don't mind?

Is there a way to combine two Match statements? Something like this:

Where Match (

    [AccountType], 'A', 'B', 'C' and

    [Name], 'Ryan Minaker'

    );

I don't get any errors when I load the data, but it just returns 0 records. I know there are records that meet this criteria...

Thanks!

R.

MVP
MVP

Re: Wildmatch not working with an SQL connection

Try like this:

Where Match([AccountType], 'A', 'B', 'C') and [Name] = 'Ryan Minaker';

or

Where Match([AccountType], 'A', 'B', 'C') and Match([Name], 'Ryan Minaker');

drminaker
New Contributor III

Re: Wildmatch not working with an SQL connection

Fantastic! Thanks so much for this - works great.

MVP
MVP

Re: Wildmatch not working with an SQL connection

Awesome , I am glad I was able to help