Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Could you help me do Wildmatch with the value of a column?

I was have a table

SAMPLE.PNG

SQL SELECT Track,

                    Proc_ID,

                    Qty

FROM "SQL_A".dbo."Data_Track";

I would like to locate all that has '*_TM_*' whether it is a lowercase or an uppecase

I will be creating another column for the result which is the showme field


I have this script

If(WildMatch([Proc_ID],'*_TM_*'), (Qty+7)*2, If(WildMatch([Proc_ID],'*_0*'), (Qty+7)*5, 'Nothing Found')) as showme


Upon Running I had this error

ErrorMsg: 'WildMatch' is not a recognized built-in function name


Please help, I'm confused. Thanks.

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

Try this? Correct me you were using this wildmatch in SQL Script, if so, Wildmatch is a QV native function and does not work in SQL Script i believe. Try below:

Table:

LOAD Track,

           Proc_ID,

           Qty,

           If(WildMatch([Proc_ID],'*_TM_*'), (Qty+7)*2, If(WildMatch([Proc_ID],'*_0*'), (Qty+7)*5, 'Nothing Found')) as ShowMe;

SQL SELECT Track,

                    Proc_ID,

                    Qty

FROM "SQL_A".dbo."Data_Track";

View solution in original post

6 Replies
jmvilaplanap
Specialist
Specialist

Hi,

Try this: wildmatch function

vishsaggi
Champion III
Champion III

Try this? Correct me you were using this wildmatch in SQL Script, if so, Wildmatch is a QV native function and does not work in SQL Script i believe. Try below:

Table:

LOAD Track,

           Proc_ID,

           Qty,

           If(WildMatch([Proc_ID],'*_TM_*'), (Qty+7)*2, If(WildMatch([Proc_ID],'*_0*'), (Qty+7)*5, 'Nothing Found')) as ShowMe;

SQL SELECT Track,

                    Proc_ID,

                    Qty

FROM "SQL_A".dbo."Data_Track";

antoniotiman
Master III
Master III

Hi Cherry,

WildMatch is QV Function (not SQL).

Use Preceding Load.

Regards,

Antonio

Anil_Babu_Samineni

You condition should work, But thing is you doing this in SQL engine. So it  won't work. Try to use only in LOAD statement rather SELECT statement.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
qv_testing
Specialist II
Specialist II

Yes, they are correct.

otherwise take resident load as a main table and apply your condition.

That should work.

Anonymous
Not applicable
Author

Hi,

Its working fine now after I used LOAD. Thanks for your help. It is much appreciated.

Regards,

Cherry