Getting the below error while querying from oracle:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at line 1
Here is my query:
with my_clob as ( select ID,SUBJECT,EMAIL_LAYOUT,EMAIL_SENDER_TYPE from BMS_EMAIL_TEMPLATE where ID = 26 ) select ID,SUBJECT,EMAIL_SENDER_TYPE, dbms_lob.substr(EMAIL_LAYOUT, 4000, (level - 1) * 4000 + 1) AS EMAIL_LAYOUT from my_clob connect by level <= ceil(dbms_lob.getlength(EMAIL_LAYOUT) / 4000)
Can anyone please help me what I am missing here?