Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
sdtfll
Contributor II
Contributor II

how to understand the set function in this situation?

dbo.Person table: 

id name

1 Grant

2  Jim

3   Bob

 

--------------------------------------------------------------------------------------

set a = 1,2;

names:

load id,name;

SQL select id,name 

FROM dbo.Person WHERE id IN ($(a));   // output: 1 Grant ; 2 Jim

 

 

set a = Grant, Jim;

names:

load id,name;

SQL select id,name 

FROM dbo.Person WHERE name IN ($(a));   // failed

1 Solution

Accepted Solutions
saran7de
Master
Master

Try this,

set a = 'Grant','Jim';

names:
load id,name;
SQL select id,name 
FROM dbo.Person WHERE name IN ($(a));

View solution in original post

2 Replies
saran7de
Master
Master

Try this,

set a = 'Grant','Jim';

names:
load id,name;
SQL select id,name 
FROM dbo.Person WHERE name IN ($(a));

View solution in original post

sdtfll
Contributor II
Contributor II
Author

Perfect, it works now, thanks so much.