How to insert CLOB more then 1 Mb (1kk characters) in Oracle by script For exmpl. using pl slq, maybe append some parts less then 32767 bytes(chars). To bypass the problem: "PLS-00172: string literal too long".
Here is my target table:
CREATE TABLE qon (x clob); 
Here is the code which throws the error:
DECLARE 
    l_clob clob := '32769 chars+ '; 
BEGIN 
    FOR i IN 1..2 
    LOOP 
        INSERT INTO qon (x) VALUES (empty_clob()) --Insert an "empty clob" (not insert null) 
        RETURNING x INTO l_clob; -- Now we can append content to clob (create a 400,000 bytes clob) 
        FOR j IN 1..3 LOOP 
            dbms_lob.append(l_clob, rpad ('',4000,'')); --dbms_lob.append(l_clob, 'string chunk to be inserted (maximum 4000 characters at a time)'); 
        END LOOP; 
     END LOOP; 
END;
Sorry, tomorow will correct. This idea - somehow insert string more then 32767
Urls I'm searched:
Oralce CLOB can't insert beyond 4000 character?
How to query a CLOB column in Oracle
http://www.oradev.com/dbms_lob.jsp
How to write oracle insert script with one field as CLOB? http://www.techonthenet.com/oracle/functions/rpad.php
How to insert/update larger size of data in the Oracle tables?
https://www.aquaclusters.com/app/home/project/public/aquadatastudio/issue/8179
https://community.oracle.com/thread/2545044
Thanks
 
     
    