Home » SQL & PL/SQL » SQL & PL/SQL » ORA-01704: string literal too long in lob columns (Oracle,10g,Linux)
ORA-01704: string literal too long in lob columns [message #392240] Tue, 17 March 2009 02:25 Go to next message
sundarfaq
Messages: 235
Registered: October 2007
Location: Chennai
Senior Member
Hi all,

I have insert records into table with clob columns. i am getting ORA-01704: string literal too long error while inserting records into table.
After that, i have inserted these records into table with empty_clob() into clob columns.

The clob records are assigned to one variable with clob datatypes and updated to row using pl/sql block.

the scripts has been attached for your references.

Is any possible to clob records inserting using insert scripts
  • Attachment: scr_clob.sql
    (Size: 9.42KB, Downloaded 1039 times)

[Updated on: Tue, 17 March 2009 02:30]

Report message to a moderator

Re: ORA-01704: string literal too long in lob columns [message #392246 is a reply to message #392240] Tue, 17 March 2009 03:08 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
In SQL there is a 4000 chr limit to a varchar2.
Anything enclosed by quotes is, by default, treated as a varchar2.

Split your XML into 4000 chr chunks, , wrap each chunk in a call to TO_CLOB(...), and concatenate these clobs.

Also - consider storing XML in am XMLTYPE column.
Previous Topic: Query regarding time difference and time difference problem (merged multiple threads)
Next Topic: Number
Goto Forum:
  


Current Time: Sun Dec 11 04:13:25 CST 2016

Total time taken to generate the page: 0.23708 seconds