stragg in 11gR2

This will be a killer in the Oracle forums 😉
LISTAGG (measure_expr [, 'delimiter_expr'])
WITHIN GROUP (order_by_clause) [OVER query_partition_clause]

for instance
SELECT LISTAGG(ename,',') WITHIN GROUP (ORDER BY ename) FROM emp;
ADAMS,ALLEN,BLAKE,CLARK,FORD,JAMES,JONES,KING,MARTIN,MILLER,SCOTT,SMITH,TURNER,WARD

9 thoughts on “stragg in 11gR2

  1. Waldar

    So it won’t be wm_concat, but I’m fine with it as long as LISTAGG is documented and performs fast !

  2. Centinul

    I was very happy when I saw this in the New Features Guide this morning!

    Don’t forget the NTH_VALUE function as well 🙂

  3. Pingback: 11gR2 New Features – parte I « Oracle and other

  4. Scott

    I was very happy to see the new analytical features, can’t wait to give them a whirl.

    Be interesting to compare the performance of this stragg feature against the others too.

  5. RC

    The collect function has also 2 extra possibilities in 11gr1 and 11gr2. You can sort and you can do a distinct. You can use this to build some kind of variant on listagg.

    Somehow these 2 new possibilities aren’t mentioned in the new feautures docs.

Comments are closed.