Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Restrict LOAD to IDs in Resident Table

In my Qlik Sense app, I am FIRST loading a list campaign members from one campaign in salesforce.

I want to load ONLY lead/contact information from people who are a part of that campaign.

I would imagine the syntax to be something like below, but I know this is not correct:

LOAD

@1,

@2,

@3;

SELECT * FROM Lead

WHERE Id IN (SELECT DISTINCT Id FROM ResidentTable)

Any help is appreciated!

23 Replies
sunny_talwar

Concat function doesn't add a comma after the last value... so you don't need to worry about that....

Can you try without single quotes here

SELECT *

FROM Lead

WHERE Id IN

('$(vListLead)');

Remove the single quotes in Red above

sunny_talwar

Concat function doesn't add a comma after the last value... so you don't need to worry about that....

Can you try without single quotes here

SELECT *

FROM Lead

WHERE Id IN

('$(vListLead)');

Remove the single quotes in Red above

Anonymous
Not applicable
Author

That was it. VERY NICE! Any ideas if the variable has more than 2K records? I believe that is the limit for the IN statement

sunny_talwar

Variable itself should not be a problem... but concatenating such a long list of values can take toll on your system resources