ORA-01704: String Literal Too Long. Cause: String Literal is Longer Than 4000 Characters (Doc ID 1412933.1)

Last updated on JULY 17, 2017

Applies to:

Siebel CRM - Version 8.2.2.4 SIA [23030] to 8.2.2.4 SIA [23030] [Release V8]
PL/SQL - Version 11.2.0.3 and later
Information in this document applies to any platform.
***Checked for relevance on 17-Jul-2017***

Symptoms


INSERTING or UPDATING data directly into a CLOB column with string lietrals fails with:


ORA-01704: string literal too long. Cause: String literal is longer than 4000 characters.

For example:

UPDATE clobtab SET clobcol ='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..... < 5K text >.......' WHERE id = 1

The target table has the following CLOB column defined:

SQL> desc clobtab
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NUMBER
CLOBCOL CLOB

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms