Hi All,
I have data like below in the table
select 111 inv_no,100 cust_id, 'ABC' att_cat, 'ABC_1' att1 from dual
union all
select 222 inv_no,200 cust_id, 'BBB' att_cat, 'BBB_1' att1 from dual
union all
select 333 inv_no,300 cust_id, 'CCC' att_cat, 'CCC_1' att1 from dual
I want to populate columns as below.
if att_cat ='ABC' then att1 -- column name should be rev_att1
if att_cat ='BBB' then att1 -- column name should be rec_att1
if att_cat ='CCC' then att1 -- column name should be adj_att1
As well i want to populate like below.
if att_cat ='ABC' or att_cat ='BBB' or att_cat ='C' then att1
how to write in one-row query?
Oracle version: 11.2.4
Thanks