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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
sdtfll
Contributor III
Contributor III

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
Saravanan_Desingh
MVP
MVP

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
Saravanan_Desingh
MVP
MVP

Try this,

set a = 'Grant','Jim';

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

Perfect, it works now, thanks so much.