The
LISTAGG
analytic function was introduced in Oracle 11g Release 2, making it very easy to aggregate strings.Sample Sql:
select listagg(''''||NAME||'''', ',') within group (order by NAME) from PS_PERSON
I/P
---
Name
------
A
B
C
D
E
The Output as
-----------------
'A','B','C','D','E':-)
No comments:
Post a Comment