Hi Dieter,
I understant that 'US,GE' <> 'US','GE' , the question is how to get the second from first?
I alreary tried what you suggest and it doesn't work.
SET QUERY = 'SELECT * FROM SOME_TABLE WHERE country_cd IN ('|| varlist || ');';
PREPARE S1 FROM QUERY;
OPEN C1 ;The error thrown is
CALL test('US');
CALL Failed. 5628: test:Column US not found in Database.SOME_TABLELooks like the varlist variable in the result QUERY string is taken for a column name
Is there any important difference between the placeholder form and the concat form of the dynamic sql?
SELECT * ...WHERE code = ?
'SELECT * ... where code = ' || variable
↧