This will also return a row for 'CH' matching 'CHG', you have to change it slightly:
SEL * FROM tb1 a , tb2 b
WHERE ','||b.cntry_code||',' LIKE '%,'||TRIM(a.cntry_code)||',%' ;
And it will cause a product join (unless there's an additional join-condition using equality).
This string-splitting topic has been done multiple times, depending on the release it might be quite simple (STRTOK_SPLIT_TO_TABLE in TD14).
This will also return a row for 'CH' matching 'CHG', you have to change it slightly:
And it will cause a product join (unless there's an additional join-condition using equality).
This string-splitting topic has been done multiple times, depending on the release it might be quite simple (STRTOK_SPLIT_TO_TABLE in TD14).