with t as (
select '1 2 3 4 ' as A from dual union all
select '1 ' from dual union all
select '2 ' from dual union all
select '2 3 ' from dula
)
with s as (
select '1' as old, 'O' as new from dual union all
select '2', 'S' from dual union all
select '3', 'T' from dual union all
select '4', 'F' from daul
)
원하는 데이터 1=O, 2=S, 3=T, 4=F 로 변환해서 조회되게, 즉 t 테이블 컬럼의 데이터가 s 테이블 new 값으로 변환입니다.
select 'O S T F ' from t
select 'O '
select 'S ;
select 'S T '
regexp_replace 함수를 잘 사용하면 될 것 같은데...도움 부탁드립니다.
|