하기와 같이 보여주려면 어떻게 해야하는지 문의 드립니다.
with t as (
Select '20091011' ymd, '044236' code, 'gs' type, 'gs' value, 20 size1 from dual
union all select '20091011', '044236', 'gs1', 'gs2', 15 from dual
union all select '20091011', '044236', 'agg', 'gs', 5 from dual
)
SELECT *
FROM T;
--type , value 컬럼의 값이 같은게 있을때
with t as (
Select '20091011' ymd, '044236' code, 'gs' type, 'gs' value, 20 size1 from dual
)
SELECT *
FROM T ;
with t as (
Select '20091011' ymd, '044236' code, 'gs1' type, 'gs' value, 20 size1 from dual
union all select '20091011', '044236', 'gs1', 'gs2', 15 from dual
union all select '20091011', '044236', 'agg', 'gs', 5 from dual
)
SELECT *
FROM T;
--type, value 컬럼의 값이 같은게 없으면 type 컬럼의 값이 'agg' 인 데이터로 보여주기..
with t as (
Select '20091011' ymd, '044236' code, 'agg' type, 'gs' value, 5 size1 from dual
)
SELECT *
FROM T ;
감사합니다. |