INSERT of Long String Literal Fails With ORA-01704 (Doc ID 1007276.6)

Last updated on JULY 14, 2016

Applies to:

Precompilers - Version 8.0.6.0 and later
Information in this document applies to any platform.
***Checked for relevance on 14th Jul 2016***

Symptoms

When inserting a string literal into a long or varchar2 field, you get the error

ORA-01704 STRING LITERAL TOO LONG.

 For example: 

insert into table (..., long_column, ...) values (..., 'A really really long
hardcoded string which is inside single quotes', ...);

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