The SQL statement below only returns records which have a value of 1 in the subsystem field. Since the value of cSubSystem is ",1,2,3,4,5,6,7,8,9,10," I expected more. There are records which match the criteria in the table and I have verified the value of cSubSystem. I have tried evaluating the variable in the statement, but that does no good or causes syntax errors. Any ideas? Thanks!
Regards, Renoir
SELECT DISTINCT ;
Codes.type, Codes.code, Codes.subsystem ;
FROM codes ;
WHERE ","+ALLTRIM(STR(Codes.subsystem))+"," IN (?csubsystem)