Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

tnbcherry
New Contributor

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
Esteemed Contributor III

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

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";

6 Replies
jmvilaplanap
Valued Contributor

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

Hi,

Try this: wildmatch function

vishsaggi
Esteemed Contributor III

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

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
Honored Contributor III

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

Hi Cherry,

WildMatch is QV Function (not SQL).

Use Preceding Load.

Regards,

Antonio

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

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.

qv_testing
Valued Contributor

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

Yes, they are correct.

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

That should work.

tnbcherry
New Contributor

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

Hi,

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

Regards,

Cherry