Comments on: Oracle RDBMS 11gR2 – LISTAGG – New aggregation operator for creating (comma) delimited strings Friends of Oracle and Java Mon, 24 Nov 2014 11:49:17 +0000 hourly 1 By: Taral Desai Fri, 04 Dec 2009 18:11:57 +0000 Hi Lucas,

That was good examples and feature. But how can you implement below same thing in 10g using collect or any other method

select deptno
, avg(sal) avg_sal
, listagg( ename, ‘,’) within group (order by sal)
from emp
by deptno

By: RC Sat, 05 Sep 2009 21:54:36 +0000 The possibility to use the collect function in combination unique or distinct or order by is new Oracle 11gr1 . I believe it isn’t possible in Oracle 10.

I hoped that listagg would return a clob instead of a varchar2. What happens when the 4000 limit is surpassed? I can’t test it because I don’t have Linux so I can’t install 11gr2 yet.

By: Laurent Schneider Wed, 02 Sep 2009 15:23:58 +0000 No, I have no plan to go to OOW this year… did you submit some trivia questions to Lilian?

Kind regards ;-)

By: Lucas Jellema Wed, 02 Sep 2009 11:30:25 +0000 Oops, in that case I have overlooked that particular feature in the COLLECT operator. And I stand corrected. That is the risk you run with such a sophisticated audience! Will we meet at OOW Laurent? Thanks for your comment! Best regards, Lucas

By: Laurent Schneider Wed, 02 Sep 2009 08:11:01 +0000 There are some limitations on using this [COLLECT] operator: it does not support an order by especially for the collected values


select collect(ename order by ename) from emp

seems to be a valid syntax