Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Alternates for Wm_concat

3018885Aug 25 2015 — edited Aug 25 2015

Hi,

We use WM_CONCAT in our local to get the set of id's with comma separated. (suppose my ids start with 1 and end with 10000).

So i use the below select wm_concat(emp_id) from emp where rownum < 2500; This works.

In oracle 12c wm_concat is not supported. Hence i tried with Listagg and other options like xml_agg , listagg but i am not able to get the required result.

It fails after the max varchar is reached(32767). Post that i am not able to get the required output. It says buffer too small and which is as expected.

What are the alternate ways. Can you please suggest on it.

Output of wm_concat returns Clob but other oracle functions used above returns only varchar.

I want the result which obtains the above result in 12c.

Thanks in advance.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 22 2015
Added on Aug 25 2015
8 comments
5,483 views