Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Talk to Experts Tuesday, Live Q&A, September 22: Moving from QlikView to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
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
Highlighted
Specialist III
Specialist III

Hi,

Maybe try with

load*,
pick(match(Type&ID,Int100,SA200,TE200),'Pack','Pack','Pack') as TestField
Highlighted
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