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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
lakshmanvepuri
Creator
Creator

Reg: LIKE in SQL - Qlikview..?

Hi Friends,

Please advise me how to use this in Qlikview scripting.

=if ( KEY_ID LIKE  'L%-L%' or KEY_ID LIKE 'L%M%SK%, x+1, y+1)

Any Example to use Match, WildMatch functions in Qlikview.

Sample data for KEY_ID:

 

L1GB-MSK
L1KB-MSK
L1LA-MSK

 

LEPLY-LEP
L05BMASK
L05EMASK

Thanks

Kumar

6 Replies
amayuresh
Creator III
Creator III

Try this,

=Pick(WildMatch([Bid Item No.],'Anti*Bo*','Anti*C*','Anti*Sof*'),'A','B','C')

Output:

1.PNG

tamilarasu
Champion
Champion

Hi,

You can use like operator in Qlikview. You can also use wild match function like below.

IF ( KEY_ID LIKE 'L*-L*' OR KEY_ID LIKE 'L*M*SK*', 'x+1', 'y+1')      as Test1,    // Method 1


IF(WildMatch(KEY_ID, 'L*-L*', 'L*M*SK*'), 'x+1', 'y+1')                       as Test2;    // Method 2

amit_saini
Master III
Master III

Hi,

try :

Syntax:

LOAD Products,

City,

pick( WildMatch(City,'*Punjab*','*Haryana*','*Delhi*'),'P1','P2','P3'

as Data

FROM

  1. Prcatice.xlsx

(ooxml, embedded labels, table is Sheet3);

Thanks,

AS

tyagishaila
Specialist
Specialist

Try it,


KeyId:

Load * Inline [

KEY_ID

L1GB-MSK

L1KB-MSK

L1LA-MSK

LEPLY-LEP

L05BMASK

L05EMASK

];

Load *,

Pick(WildMatch([KEY_ID],'L*L*'),[KEY_ID]) as newKey1,

Pick(WildMatch([KEY_ID],'L*M*SK*'),[KEY_ID]) as newKey2

Resident KeyId;

DROP Table KeyId;

MayilVahanan

Hi

Try like this

Load *, if (WildMatch(KEY_ID,'L*-L*', 'L*M*SK*'), 1, 2) as NewField Inline

[

KEY_ID

L1GB-MSK

L1KB-MSK

L1LA-MSK

LEPLY-LEP

L05BMASK

L05EMASK

];

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Kushal_Chawda