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!

Dynamic String Aggregation exceeding 4000byte length. Oracle 11g

metalrayOct 5 2012 — edited Oct 10 2012
Hello Guys,

We are using Oracle 11g

I have a problem with the string concatenation being too large. I looked around for a while
and people suggested custom functions (which is difficult due to restrictions in our db environemnt)
or using a clob datatype. Now I have not found a way how to use a clob with the below method.
The number of rows I have to merge varies with each IDNum group so it has to be dynamic

--ORA-01489: result of string concatenation is too long

SELECT LISTAGG(MYBIGTEXT,',') WITHIN GROUP( ORDER BY IDNum) A FROM ourtablewithbigtext ;

Thanks for any hints.
This post has been answered by Stew Ashton on Oct 10 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 7 2012
Added on Oct 5 2012
9 comments
2,056 views