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: 
Not applicable

how to use "in" keyword in qlikview

what is the alternate of "in" keyword of sql in qlikview

i use in sql

select name from customer where cutomerid in (select customerid from customer where sal>5000)

how i write this query in qlikview

?

1 Solution

Accepted Solutions
disqr_rm
Partner - Specialist III
Partner - Specialist III

Look into EXISTS() function. It can be used in your WHERE condition.

View solution in original post

3 Replies
disqr_rm
Partner - Specialist III
Partner - Specialist III

Look into EXISTS() function. It can be used in your WHERE condition.

brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

best use the function exists()

Tab1: Load ID1, * from Table1;

Tab2: Load ID2,* from Table2 Where exists(ID1,ID2);

With SQL Select ist looks like:

Tab1: Load ID1, *; SQL Select * from Table1;

Tab2: Load ID2,* Where exists(ID1,ID2); SQL Select * from Table2 ;

Not applicable
Author

Hi,

You can use different approaches to achieve this.

The first approach is :-

Customers:

Load *;

SQL select * from customer where cutomerid in (select customerid from customer where sal>5000);

The Second approach is :-

CustomerCodes:

Load customerid as Cust_Code ;

SQL select customerid from customer where sal>5000;

Customers_Temp:

Load *;

SQL select * from customer ;

Customers:

Load * ,

1 as Test

resident Customers_Temp where exists(Cust_Code, cutomerid )

drop table Customers_Temp;

drop table CustomerCodes;

drop field Test;

I hope this will help you.

Thanks & Best Regards,

Kuldeep Tak