Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

wildmatch

The goal is to find the rows including the values in NAME,

the wildmatch don't work in this case, please help me to correct it? Thank you very much!

TN:

LOAD

    NAME

FROM

(qvd)

WHERE len(NOM_GROUPE) = 0;

   

let i = 1;

//set iend = 50000; //NoOfrows(TN);

do while i <= 50000

    let NCom = '*' & peek(NAME, $(i), 'TN') & '*';

    T:

    load Distinct

    NOM_GROUPE,

    REF_GROUPE

    FROM

   

    (qvd)

    where wildmatch(NOM_GROUPE, $(NCom) )=1

    ;   

    let i = i+1    ;

loop

;

9 Replies

Re: wildmatch

Use Exists in this way:

TN:

LOAD

    NAME

FROM

(qvd)

WHERE len(NOM_GROUPE) = 0;

   

   load

    NOM_GROUPE,

    REF_GROUPE

    FROM

   

    (qvd)

    where exists(NAME, NOM_GROUPE)

let me know

Not applicable

Re: wildmatch

I'm sorry, what I want is NAME include NOM_GROUPE or NOM_GROUPE include NAME, not the same.

Re: wildmatch

Ok,

then how many NAME you have from TN Table?

If you have not lots of names then you can concat NAME into a string then compare this string to the NOM-GRUPPE into the second load directly, without any loop

Re: wildmatch

try,

let i = 1;

//set iend = 50000; //NoOfrows(TN);

do while i <= 50000

    let NCom = peek(NAME, $(i), 'TN') ;

    T:

    load Distinct

    NOM_GROUPE,

    REF_GROUPE

    FROM

   

    (qvd)

    where wildmatch(NOM_GROUPE, '*$(NCom)*" )=1

    ;  

    let i = i+1    ;

loop

;

sasiparupudi1
Honored Contributor III

Re: wildmatch

It is hard to say why the wildmatch wouldnt work without looking at your data. could you upload a data sample may be?

Arjunarao
Honored Contributor II

Re: wildmatch

Hi AdamiSliu

Please attach some sample data. Thank you.

Not applicable

Re: wildmatch

Not applicable

Re: wildmatch

Arjunarao
Honored Contributor II

Re: wildmatch

hi AdamiSliu

What is this?