Good Afternoon Gurus;
I am working on a situation where I need to collapse distinct values in different fields in subsequent rows into one row based on unique combinations
Here it is:
with t as
(
select '18' sp_pl, '217661211' ti, '204D00000X' tx_1, '' tx_2, '' tx_3 from dual
union all
select '18' sp_pl, '217661211' ti, '' tx_1, '20988823Y' tx_2, '' tx_3 from dual
union all
select '18' sp_pl, '217661211' ti, '' tx_1, '' tx_2, '45533823Q' tx_3 from dual
)
select * from t;

| SP_PL | TI | TX_1 | TX_2 | TX_3 |
| 18 | 217661211 | 204D00000X | | |
| 18 | 217661211 | | 20988823Y | |
| 18 | 217661211 | | | 45533823Q |
My output would have to collapse tx_1, tx_2, and tx_3 values into one row based on unique SP_PL and TI combination
eg
SP_PL TI TX_1 TX_2 TX_3
18 217661211 204D00000X 209888823Y 45533823Q
Please guide me
J1604