ORA-12728: invalid range in regular expression
I try to filter results by regular expressions but I keep getting
ORA-12728: invalid range in regular expression
although the inner query returns only matched rows:
AA-AH
AI-AM
AN-AZ
select * from
(select id,name
from t
where regexp_LIKE(name,'[A-Z][A-Z]\-[A-Z][A-Z]')
)
where
REGEXP_LIKE (UPPER(SUBSTR (:singer, 1, 2)), substr(name,1,1)||'[' || substr(name,2,1)||'-'||substr(name,5,1)||']')
How can I force the outer query not to be merged with the inner one so the not matched rows would not be evaluated by the outer where clause?