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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
AH
Creator III
Creator III

Translating SQL where clause in Qlik If statement


SQL statement
where (Type = 'Int' and ID = '100') or ( Type IN ('SA,'TE') and ID = '200')

 

Qlik Script:

Load

IF((Wildmatch(Type,'Int') and match(ID,'100') )or (Wildmatch(Type,'SA,'TE') and match(ID,'200') ), 'Pack') as TestField

 

where i am doing wrong in Qlik if statement? Any help would be very much appreciated.

 

Thanks,

AH

1 Solution

Accepted Solutions
TimvB
Creator II
Creator II

Try this:

If((Type = 'Int' and ID = '100') or ( match(Type,'SA,'TE') and ID = '200'),'TRUE','FALSE') as TestField

Hope it helps!

View solution in original post

2 Replies
sergio0592
Specialist III
Specialist III

Hi,

Maybe try with

load*,
pick(match(Type&ID,Int100,SA200,TE200),'Pack','Pack','Pack') as TestField
TimvB
Creator II
Creator II

Try this:

If((Type = 'Int' and ID = '100') or ( match(Type,'SA,'TE') and ID = '200'),'TRUE','FALSE') as TestField

Hope it helps!