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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Ayden
Contributor III
Contributor III

variable for SQL load

hello all I am trying to use a variable in the data load on the SQL part of my scripts and it fails every time I load please what am I doing wrong here.

 

SET vPLNT = 'CO','10','101,'102','103','104','105','ap1';

 

 

SELECT
MAX("Date") as DEV_DATE,
"AT" AS PROJECT_N


FROM XYZ_TABLE
WHERE 
'$(vPLNT)' AND
TYP='101'
GROUP BY "AT"
ORDER BY "AT"

1 Reply
Or
MVP
MVP

This doesn't appear to be a valid SQL statement... the line the variable is in appears to be missing some sort of conditional statement. You're also missing a ' after the 101, and the '$(vPLNT)' should probably just be $(vPLNT).