In my oracle database i have 2 tables and i have to join them where in TABLE A i have column ID which is number, and TABLE B where i have column SCIDS which is varchar2. Here is some example:
TABLEA.ID | TABLEB.SCIDS
162 | 162,163
162 | 555,162,33
161 | 161
Some sql i tried
select A.ID
from TABLEA A
left JOIN TABLEB B
where "," || S.ID in "," || B.SCIDS
This does not work it return only the records that are not "array" in SCIDS e.g 3rd record 161.
How to return all ?