Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a list of customer numbers I write to a list and then store it in a variable, ie
vList = 12345, 875895, 98371.... (less than 1000 customer numbers in the list).
I then try to use the variable in a SQL script in the loader, something like:
SQL Select * from Table where Customer_Num in ($(vList));
But I get the following error: Syntax error: expected something between '(' and ')'.
If I type the Customer numbers into the SQL in the following format manually, i.e. '12345, 875895, 98371' - - it works. But when I try doing it in the variable, it doesnt work and gives above error.
I also tried char(39) & vList & char(39)... no luck
Any advice?
SET vList = 12345, 875895, 98371 ;
// try this
SQL Select * from Table where Customer_Num in ('$(vList)');
// or this
SQL Select * from Table where Customer_Num in ($(vList));