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!

Getting this error "result of string concatenation is too long"

Kannan SekarFeb 11 2021

I need to do concatenate a name column based on id column. The concatenate string contains more than 4000 characters, so i'm getting this error "result of string concatenation is too long".. Please help me how to avoid this error..
CREATE TABLE T1 (ID NUMBER, NAME VARCHAR2(250));
INSERT INTO T1 (ID, NAME) VALUES (100, 'ASDFG');
INSERT INTO T1 (ID, NAME) VALUES (100, 'ASDFGHJHFRRD');
INSERT INTO T1 (ID, NAME) VALUES (100, 'QWERTYUIKJHGFDSAFGHYT');
output like:
--------------
id name
100 ASDFG, ASDFGHJHFRRD, QWERTYUIKJHGFDSAFGHYT.............................

Comments
Post Details
Added on Feb 11 2021
5 comments
968 views