Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Shahzad_Ahsan
Creator III
Creator III

How to use where clause for multiple values

Hi Everyone

I have thousands of employees in my database table but I want to fetch only 10 of them.

How can I give the syntax in where clause.

This is my query

SQL select * from Employee

1 Solution

Accepted Solutions
pradosh_thakur
Master II
Master II

Filter using SQL

SQL select * from Employee

where employee_name in ('a1','a2','a3');

or in  Qlik

load * where match(employee_name,'a1','a2','a3');

SQL select * from Employee;

Learning never stops.

View solution in original post

4 Replies
mdmukramali
Specialist III
Specialist III

Hi Shahzad,

you can try something like this.

SQL select * from Employee

WHERE EmployeeID IN (value1, value2, ...);



Thanks,

Mukram.

pradosh_thakur
Master II
Master II

Filter using SQL

SQL select * from Employee

where employee_name in ('a1','a2','a3');

or in  Qlik

load * where match(employee_name,'a1','a2','a3');

SQL select * from Employee;

Learning never stops.
Shahzad_Ahsan
Creator III
Creator III
Author

Thank You Mohammad & Pradosh

I was using 'in' but it was giving error. So I thought 'in' will not work in data load editor.

But the problem was, I was  not using single quote (') between employee code.

After using single quote, problem solved

Thank You

pradosh_thakur
Master II
Master II

Please mark the answers correct and helpful ..

Learning never stops.