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!

ORA-01489: result of string concatenation is too long

Eric999Mar 12 2019 — edited Mar 12 2019

The below code WAS working fine, but since we have more data, I'm now receiving an ORA-01480 error. I've seen posts on here where using XMLAGG allows for more larger strings, but I can't seem to convert the below statement to use to use it. Can someone assist?

RTRIM(

      REGEXP_REPLACE((LISTAGG(TO_CHAR(table.column),';') WITHIN GROUP (ORDER BY table.column)

          OVER (PARTITION by table.column, table.column)),

          '([^;]*)(;\1)+($|;)',

          '\1\3'),

       ';') AS ZZZZZ

This post has been answered by mathguy on Mar 12 2019
Jump to Answer
Comments
Post Details
Added on Mar 12 2019
15 comments
6,533 views