Oracle Database 11g Enterprise Edition Release 126.96.36.199.0 - 64bit Production
PL/SQL Release 188.8.131.52.0 - Production
CORE 184.108.40.206.0 Production
TNS for Linux: Version 220.127.116.11.0 - Production
NLSRTL Version 18.104.22.168.0 - Production
I'm using listagg function to concatenate the column values. I have nearly 4000 records in the table. I guess listagg function can concatenate till 4000 characters and if it exceeds 4000 then I'm getting an Ora error which says 'results of string concatenation is too long'.
select listagg(id, ',') within group (order by id) from (select level as id from dual connect by level < 1000);
select listagg(id, ',') within group (order by id) from (select level as id from dual connect by level < 1050);
How to handle the issue?