with t as (select '1st APPLE' text from dual union all
select '2nd apple' text from dual union all
select '3th APPLE apple' test from dual )
select text
,REGEXP_REPLACE(text,'(APPLE|apple)',(CASE WHEN text like '%APPLE%' THEN 'PINEAPPLE'
WHEN text like '%apple%' THEN 'pineapple' END) )
from t;
위와 같은 조회쿼리가 있습니다.
대문자가 대문자로, 소문자가 소문자로 변경이 되어야 합니다.
만약, 대소문자가 같이 존재했을 때, 각각 대소문자로 변경되어야 한다면
어떻게 처리해야 되는지 궁금합니다...