Skip to content
February 24, 2011 / doganay

PLS-00172: string literal too long

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Hi,

If you hit this error, you might be using a very long hard-coded clob definition.

for example:

declare
a clob;
begin
— imagine that this a is 60000 chars for example..
a:=’….’
..
–other stuff..

end;

well, you will hit this error in this situation.

instead of hard-coding, insert this clob into a table’s clob column.

create table test1
(
c clob
);

then, in your code select this value into your clob. so, your updated code:

declare
a clob;
begin
— imagine that this a is 60000 chars for example..
select c into a from test1;
..
–other stuff..

end;

now, you’re done. Also, you may choose to use small variables and concat them..

a:=’..’
b:=’..’
c:=a||b||’…’;

try and pray ):

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: