Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Is it possible to use the variable in Qlik in SQL?
In my sample below, the result is that the output still includes Name1 .
SET vList = 'Name1' , 'Name2';
LOAD
FirstName, LastName
;
SQL
SELECT
FirstName, LastName
FROM Table1
WHERE LastName NOT IN '$(vList)'
;
The variable vList contains already the string-wrapping quotes and therefore the call of the variable doesn't have them, means the where should like:
WHERE LastName NOT IN $(vList);
Yes it is possible
The variable vList contains already the string-wrapping quotes and therefore the call of the variable doesn't have them, means the where should like:
WHERE LastName NOT IN $(vList);
Thanks, didn't know I have to removed the single quotes in the SQL.
Mine is now working.