:

ORA-01704: string literal too long

While attempting to update a column in a table of data type CLOB, one of the business analysts received this error message:

ORA-01704: string literal too long

They were trying to update the table with a SQL statement and with a SQL statement you can only specify up to 4000 bytes. The way to get something larger in is to use pl\sql which supports up to 32767 bytes. Here is an example of how to solve the ORA-01704: string literal too long error:

declare
vClobVal varchar2(32767) := ‘<Add text string here>’;
begin
update CLOBTAB set CLOBCOL = vClobVal;
end;
/

Like it, share it...

Category: SQL


Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *