Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Select code in some values

Hello.

I want to select the code in some values like in sql ( where code in ('01','11','12').

I use the fonction Qlikview match (  where match(trim(code),01','11','12') ). But the result give informations where trim(code) is different of '01','11','12'.

Match is it the correct fonction?

Best Regard's

1 Solution

Accepted Solutions
Not applicable
Author

Ok i try an other join (inner join). I make you returne.

View solution in original post

17 Replies
anbu1984
Master III
Master III

Match is correct function.

What other codes do you see in the table? Can you post the script?

manideep78
Partner - Specialist
Partner - Specialist

where match(code,01,11,12)

or

wildmatch(code,01,11,12)

PrashantSangle

Hi,


Can you post your script??

If you write same code as mention above then you are missing one ' single quote before 01.

where match(trim(code),'01','11','12')

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

Hello.

You aske me to give the scipt.

I try to send the script under your answer but i can't had attechement.

we see in the table TABLE_TT that CODE_QUAI(QUAI as CODE_QUAI) has no values.

In the script

Where Match(Trim(QUAI),'Q21','Q21-22','Q22','Q22-23','Q24','Q24-25','Q25')

so we must have something ('Q21','Q21-22','Q22','Q22-23','Q24','Q24-25','Q25') in CODE_QUAI.

look on

Select code in somme values(2)

what is wrong?

Best regard's

manideep78
Partner - Specialist
Partner - Specialist

Where Match(QUAI,'Q21','Q21-22','Q22','Q22-23','Q24','Q24-25','Q25')

Not applicable
Author

Do you find the attechement on Select code in somme values(2) please Mr anbu1984?

anbu1984
Master III
Master III

No. If it is not huge script, you can directly paste script in reply else select "Use advanced editor" and upload script

What are the values do you see other than mentioned in your where clause "Where Match(Trim(QUAI),'Q21','Q21-22','Q22','Q22-23','Q24','Q24-25','Q25')" ?

Not applicable
Author

Hello Manideep78.

Trim(QUAI) alow to remouve space before and after QUAI. I think that Match(Trim(QUAI),'Q21','Q21-22','Q22','Q22-23','Q24','Q24-25','Q25') is correct.

Not applicable
Author

//This is an extract of the script of  fact Table (TABLE_TT)

left join (TRAFICCOTENEUR_IMP_ABJ)

LOAD QUCLEUNIK,

QUAI as CODE_QUAI,

     BOL_DEB,

     BOL_FIN,

date(right(ACCOSTAGE,2)&'/'&left(right(ACCOSTAGE,4),2)&'/'&left(ACCOSTAGE,4),'DD/MM/YYYY') as 'Date Accostage',

H_ACCOSTAGE as 'Heure Accostage',

date(right(APPAREILLAGE,2)&'/'&left(right(APPAREILLAGE,4),2)&'/'&left(APPAREILLAGE,4),'DD/MM/YYYY') as 'Date Appareillage',

     H_APPAREILLAGE as 'Heure Appareillage',

     SEJOUR as 'Sejour Quai',

     SITUAT as CODE_SIT,

     ESCLEUNIK as ESCLEUNIK_Quai,

     MVT_ACCOSTAGE,

     MVT_APPAREILLAGE

FROM $(MonChemin)QUAI.qvd (qvd)

Where Match(Trim(QUAI),'Q21','Q21-22','Q22','Q22-23','Q24','Q24-25','Q25')

and not(isnull(Trim(QUAI)));

In the fact table TABLE_TT sometime i have CODE_QUAI with moting ( - ) or CODE_QUAI which is not in (,'Q21','Q21-22','Q22','Q22-23','Q24','Q24-25','Q25')

Thank's