I would like to replace the following code in Qlik Sense Data Loader
SQL
SELECT
I_PLT,
DEPTCODE,
LINECODE,
X_LINE_DESC
from m.maslin
WHERE I_PLT in ('02462','02470','04012','04025')
with UR;
With something like this:
set vPlantsToLoad = 02462,02470,04012,04025;
SQL
SELECT
I_PLT,
DEPTCODE,
LINECODE,
X_LINE_DESC
from m.maslin
WHERE I_PLT in '$(vPlantsToLoad)'
with UR;
Your variable needs to match how you've formatted your filter in the first part.
E.g. set vPlantsToLoad = ('02462','02470','04012','04025');
I had already tried that. When I do it like that I get the following error.
Can you include the part of your script where you set the variable?