简体   繁体   中英

How to convert string to clob?

I have procedure

PROCEDURE test_proc (text IN Clob) as
Begin
  insert into table_name values(SYSDATE,xmltype.createxml(text));
end ;

And I run

begin
  test_proc('.....text...');
end;

Length of the text is 64.8 KB

erorr: PLS-00172:string literal too long

But, If I insert the text into Value/Expresion (SQL Navigator 6.7.0 Relase) and execute the procedure -> PL/SQL block executed

The problem is not with the conversion, the problem is with your string literal. It is too big for the Oracle SQL parser to handle.

Maybe load the CLOB from a file instead?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM