Prøv
select something
from somewhere
where someColumn in (select regexp_substr('abc-def-xyz','[^-]+', 1, level) from dual
connect by regexp_substr('abc-def-xyz', '[^-]+', 1, level) is not null);
At generalisere (i betragtning af at dine felter er adskilt af "-")
select something
from somewhere
where someColumn in (select regexp_substr(variable,'[^-]+', 1, level) from dual
connect by regexp_substr(variable, '[^-]+', 1, level) is not null);
Grundlæggende er output fra underforespørgslen vist nedenfor -
SQL> select regexp_substr('abc-def-xyz','[^-]+', 1, level) value from dual
connect by regexp_substr('abc-def-xyz', '[^-]+', 1, level) is not null;
VALUE
--------------------------------
abc
def
xyz