If you’ve encountered the problem ora-01489: result of string concatenation is too long , result of string concatenation is too lengthy when using the LISTAGG() function in Oracle. A VARCHAR2 column in Oracle can have a maximum of 4000 characters. Some may claim that this restriction has changed in more recent Oracle versions. Under the hood, however, Oracle did little more than employ CLOB data types to hold variables longer than 4000 characters. That is, it appears that longer varchar2 values are possible.
In sqlplus, the output of string concatenation is excessively lengthy (Ora-01489).
The listing concatenation of the two fields from the source table appropriately. The result of string concatenation is very lengthy. I receive the Oracle error ora-01489 when I design a
single view that will yield both the concatenation and the listing.
“ORA-01489: string concatenation result is too lengthy” (The string is short) 0 Using dbms lob.substr to convert and concatenate a clob column results in an ‘ORA-01489: a result of string concatenation is too lengthy’ error.
We wrote Stored Procedures to retrieve data from our database and insert it into around seven tables. After that, I use a SQL*plus script to join the tables and concatenate the data into a set length file. I transfer this file to the network so that another system may use it.
The result of string concatenation is too long after using to clob. *Because the result of string concatenation exceeds the maximum size. *Action: Make Google your buddy and use it. The art is always selecting the appropriate phrase to search on; perhaps “Oracle concatenation operator” will suffice. You should check the Oracle documentation for an answer to your question. In summary, if you concatenate many single-character strings as you do, you will hit the 4000 byte limit for VARCHAR2.