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"
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).