Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
vishsaggi
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
vishsaggi
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;



Anonymous
Not applicable
Author

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

vishsaggi
Champion III
Champion III

No problem.