Oracle error
ORA-01489
ORA-01489: result of string concatenation is too long
What usually causes it
A concatenation or LISTAGG passed the VARCHAR2 limit (4000 bytes unless MAX_STRING_SIZE is EXTENDED).
What to check first
On 12.2 and later, use LISTAGG ... ON OVERFLOW TRUNCATE. Otherwise aggregate into a CLOB.