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!

Insert huge statement into clob using 'insert into' statement

I am trying to create a html page from my plsql procedure. For this I am planning to:

  1. Gather the data from required tables and format the data into a html data format
  2. Insert the html template (along with background images and styles) into a table.
  3. In my plsql code, read the template from table in page 2 and replace the data from 1 into a placeholder of the template.

Now, the template I am using is a pre existing one, and is a huge one. So I am not able to perform step 2. I am receiving the error:

PLS-00172: string literal too long

Looking at other articles, I see that I will have to perform a concatenation in order to insert a huge data into clob. Now my html file has lots of special characters and quotes, so concatenation is going to be tough. Is there a simpler way to insert the huge data into clob?

Also, please feel free to suggest me easier approaches for my POC.

This post has been answered by BluShadow on Dec 8 2023
Jump to Answer
Comments
Post Details
Added on Dec 8 2023
5 comments
1,053 views