Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
ch_thies
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
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;



View solution in original post

ch_thies
Contributor III
Contributor III

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

vishsaggi
Champion III
Champion III

No problem.