Hi,
Can anyone please suggest to write a query with combination of LISTAGG and DISTINCT with multiple tables join in 12c. I use below query in 11g, but the same query is not working in 12c due to deprecated function WM_CONCAT. Could you please provide any alternate solution for this query in 12c
select a.PS_NETWORK_ID,
c.name,
c.mcc,
WM_CONCAT(distinct d.tc_mnc) AS MNC,
WM_CONCAT(distinct d.TC_TADIG_CODE) AS TADIG,
a.PS_DNISNAME,
b.DMUD_FROM_VALUE,
b.DMUD_TO_VALUE
from
srs_pool_selection a,
sds_dnis_mapping_ui_data b,
irdb_networklist c,
IRDB_TADIG_CODES d
where a.PS_DNISNAME=b.DMUD_DNISNAME
and a.ps_network_id=c.networkid
and c.networkid=d.TC_NETWORK_ID
and c.MCC||MNC=d.TC_MCC||d.TC_MNC
group by a.PS_NETWORK_ID,c.name, c.mcc,a.PS_DNISNAME,b.DMUD_FROM_VALUE,b.DMUD_TO_VALUE
order by c.name;
Thanks & Regards,
Vikas