I have an comma delimited string which I want to use in an \"IN\" clause of the statement. eg: 100,101,102
Since In and \"IN\" clause I have to quote the individial
As the comma-separated values contain only digits, why not try something as simple as using:
INSTR(','||my_csv_list_of_values||',', ','||my_search_value||',') <> 0
See this example:
-- some test data
with employee as (
select 101 as employee_number from dual
union select 200 from dual
union select 10 from dual
union select 102 from dual)
-- the actual query
select * from employee
where INSTR(','||'101,102,103,104'||',', ','||employee_number||',') <> 0;
-- ^^^^^^^^^^^^^^^^^
-- your CSV data
Producing:
EMPLOYEE_NUMBER
101
102