Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
New-Qlik
Creator II
Creator II

Where clause multiple OR values

Hi,

I need help where an where clause in whihc i wnat to pass multiple or conditions .

if i write it this way it works

where

ID = '11' or

ID = '13' or

ID = '18' or

ID = '19' or

ID = '22' or

ID = '25' or

ID = '37' 

 

Is three any smart way to pass these multiple OR conditions 

Thanks

 

 

2 Replies
jwjackso
Specialist III
Specialist III

You can try the Match() function in Qlik Load statements

Where Match(ID,'11','13','18','19','22','25',37) > 0

 

If this is a database query, try

Where ID in ('11','13','18','19','22','25',37) 

Kushal_Chawda

@New-Qlik  Well if you say smart way then below is the smart way . You can create inline table for all the Ids which you want to filter and then use exists while loading data

IDS:
load * inline [
ID
11
12
13
14 ];

Data:

LOAD *

FROM table

where exists (ID);

Note: Make sure that Field name in inline table should match with field name in your actual data table to have a optimized load