IN expects a series of values like In (1,5,23,7)
but :portCode supplies a String as 1 single value "'AB','TS','SK','GM'" which is useless
better use
SET portCode = $lb("AB","TS","SK","GM")
and
SELECT STRING(Descrtiption,' (',Code,')') as Description,Code FROM Test.Codes
WHERE Code %INLIST :portCode
- Log in to post comments