Вот один из вариантов. См комментарии в коде.
SQL> with
2 test (id, col) as
3 -- Test sample data
4 (select 1, 'The Project will contain Data from Book' from dual union all
5 select 2, 'The Project Data is not valid' from dual union all
6 select 3, 'Project is the best data Book exists' from dual
7 ),
8 param (par) as
9 -- input parameter
10 (select 'Project|Data|Book' from dual),
11 --
12 spltest as
13 -- split TEST sentences to words
14 (select id,
15 lower(regexp_substr(col, '[^ ]+', 1, column_value)) val
16 from test cross join table(cast(multiset(select level from dual
17 connect by level <= regexp_count(col, ' ') + 1
18 ) as sys.odcinumberlist))
19 ),
20 splpar as
21 -- split PARAMETER into words; include IDs from TEST
22 (select t.id,
23 lower(regexp_substr(p.par, '[^\|]+', 1, column_value)) val
24 from param p cross join test t
25 cross join table(cast(multiset(select level from dual
26 connect by level <= regexp_count(p.par, '\|') + 1
27 ) as sys.odcinumberlist))
28 )
29 -- final result: select rows from the TEST table ...
30 select t.id, t.col
31 from test t
32 -- ... where ID is contained in intersected set of values from SPLTEST and SPLPAR ...
33 where t.id in (select x.id from (select t1.id, t1.val from spltest t1
34 intersect
35 select p.id, p.val from splpar p
36 ) x
37 group by x.id
38 -- ... while that "intersected set" has to contain all values from the PARAM
39 having count(*) = (select regexp_count(p1.par, '\|') + 1
40 from param p1
41 )
42 );
ID COL
---------- ---------------------------------------
1 The Project will contain Data from Book
3 Project is the best data Book exists
SQL>