Warm tip: This article is reproduced from serverfault.com, please click

Error : ORA-01704: string literal too long

发布于 2012-12-19 04:50:21

While I try to set the value of over 4000 characters on a field that has data type CLOB, it gives me this error :

ORA-01704: string literal too long.

Any suggestion, which data type would be applicable for me if I have to set value of unlimited characters although for my case, it happens to be of about 15000 chars.

Note : The long string that I am trying to store is encoded in ANSI.

Questioner
hsuk
Viewed
0
knagaev 2012-12-19 14:56:07

What are you using when operate with CLOB?

In all events you can do it with PL/SQL

DECLARE
  str varchar2(32767);
BEGIN
  str := 'Very-very-...-very-very-very-very-very-very long string value';
  update t1 set col1 = str;
END;
/

Proof link on SQLFiddle