Skip to Main Content

APEX

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!

How to print large CLOB HTML in PL/SQL Dynamic Content?

cilyrikMay 22 2020 — edited May 23 2020

For some reason htp.p successfully prints only within 30000 characters substring limit. And I would like to rewrite the following code in a smarter, beautified, eloquent manner:

declare

   p_clob clob;

   p_clob1 clob;

   p_clob2 clob;

   p_clob3 clob;

begin

   p_clob := my_pkg.render(arg_one => :P100_ITEM); -- my_pkg.render returns a CLOB with HTML

   p_clob1 := substr(p_clob,0,30000);

   p_clob2 := substr(p_clob,30001,60000);

   htp.p(p_clob1);

   htp.p(p_clob2);

exception when others then

   htp.p(length(p_clob));

end;

Facultative question

What's htp.p, what limitations does it have and why it is not listed in this documentation?

This post has been answered by Pavel_p on May 22 2020
Jump to Answer
Comments
Post Details
Added on May 22 2020
1 comment
5,491 views