Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Write this SQL sentence but in QLIK script

Hi there!

How can I write this sentence in SQL but in a way that works in qlik?

select a.id

from table1 a

where a.id in (1, 5, 9)

I try the code below, bit seems that "in" in the "where" part doesn't work. The resident "table1" table exists and it contains data.

idTable:

LOAD id

Resident table1

where id in (1,5,9);

The 1, 5 and 9 are an example. I have much more items to consider, so replacing with "or" condition is not an option, or it'll be my last option.

Thanks in advance.

1 Solution

Accepted Solutions
Highlighted
Champion III
Champion III

Try this using Match function like

you can add additional values in match by giving comma.

idTable:

LOAD id

Resident table1

where MATCH(ID, 1,5,9)>0;



View solution in original post

3 Replies
Highlighted
Champion III
Champion III

Try this using Match function like

you can add additional values in match by giving comma.

idTable:

LOAD id

Resident table1

where MATCH(ID, 1,5,9)>0;



View solution in original post

Contributor III
Contributor III

Awesome. That's exactly what I need. Thanks!

Highlighted
Champion III
Champion III

No problem.