If I want to select some objects from dba_source which uses some function. I can write it like
Select * from dba_source where text like '%some_name%';
If I want to do the same thing for multiple names. How do i do it?
I'm aware of the usage of LIKE and OR, but the Names am getting are again from another table. So, Is there a way to do something like:
SELECT * FROM DBA_SOURCE WHERE TEXT LIKE IN(SELECT PROCESS_NAME FROM PROCESSES);
But I also want to add Wild card characters like %
at the ends.
Is it possible. or can you suggest any other way?
I also tried
WITH pnames AS (SELECT PROCESS_NAME FROM PROCESSES)
SELECT * FROM DBA_SOURCE dbas WHERE INSTR(dbas.text,pnames.process_name,1,1)>0;
It didn't work.
Joining with % || % is a good idea. But, It takes more time to run. Is there any better way to deal with this