sql - Split values from one column into multiple columns -
i have got following query
select mobile_no, customer_no, processing_date, listagg(maak, '-') within group (order maak)
which outputs example
mobile no |user | date | maak 04343243 |1000978 | 31-jan-14 | cross net(mins)-4.271-66.1-landline(mins)-2.029-200.467
how can split values in column maak based on '-' in different columns called tariff, amount , usage. desired output in case be
mobile no | user | date | tariff | amount | usage | tariff | amount | usage 04343243 | 1000978 | 31-jan-14 | cross net(mins) | 4.271 | 66.1 | landline(mins) | 2.029 | 200.467
also, looking standard code independent of number of '-' in row work number of '-'.
Comments
Post a Comment