11gを想定(listagg
の場合) 導入されました):
select CONTRACT_NAME
|| '|'
|| LISTAGG(D.SERIALNUM, ',') within group (order by CONTRACTID)
from CONTRACTS C join DEVICES D on D.FK_CONTRACTID = C.CONTRACTID
group by CONTRACT_NAME
11gを想定(listagg
の場合) 導入されました):
select CONTRACT_NAME
|| '|'
|| LISTAGG(D.SERIALNUM, ',') within group (order by CONTRACTID)
from CONTRACTS C join DEVICES D on D.FK_CONTRACTID = C.CONTRACTID
group by CONTRACT_NAME