What I've had to do in similar circumstances is build an SQL function that parses an input parameter into a subtable and then use that in the where statement.
I'm not sure how to do this in Oracle. All my code is T-SQL. But here's how I do it in T-SQL:
create function fString_Parser2
(@List_in varchar(8000),
@Delim_in varchar(10))
returns @Strings table
(StrValue varchar(8000))
as
/*
***** Takes a varchar string and turns it into a table of
***** selectable substrings
*/
begin
--Parses List
while charindex(@delim_in, @list_in) > 0
begin
insert into @Strings (strvalue)
select replace(ltrim(rtrim(substring(@list_in,1, charindex(@delim_in,@list_in)+len(@delim_in)-1))), @delim_in, '')
set @list_in = rtrim(ltrim(substring(@list_in, charindex(@delim_in,@list_in) + len(@delim_in), len(@list_in))))
End
--Inserts final value
insert into @strings (strvalue)
select replace(ltrim(rtrim(@list_in)), @delim_in, '')
Return
end
go
create proc pSelect
(@Names_in varchar(8000),
@Delim_in varchar(10))
as
select *
from det
where name in
(select strval
from dbo.fstring_parser2(@names_in, @delim_in))
Again, I don't know if that translates well to Oracle's implementation of SQL, but it works nicely in T-SQL.