Oracle – ORA-01489: result of string concatenation is too long [duplicate]
You are exceeding the SQL limit of 4000 bytes which applies to LISTAGG as well. As a workaround, you could use XMLAGG. For example, If you want to concatenate multiple columns which itself have 4000 bytes, then you can concatenate the XMLAGG output of each column to avoid the SQL limit of 4000 bytes. For example,