var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Inserting CLOBS from SQL statements
Can anyone point me to a code example of how to insert more than 4000 characters into a CLOB field in Oracle 8.1.6 using SQL statements?
I have a Cold Fusion page that takes input from a form to post to a database. If the "body" field is more than 4000 characters, the page returns the following error:
Oracle Error Code = 1704
ORA-01704: string literal too long
The code I'm using is just a simple INSERT into as follows
Thanks in advance for any help.
Look no further than:
Check the latest Oracle DBA forums for more information:
Hope that helps,
Senior Oracle DBA
Why would he go to that forum? It's rubbish compared to this IMVHO?
Why do not you answer the user's question and let the the PEOPLE decide which one is better?????
Show how do you know ORACLE !!!
Hope this code solves ur problem
create table temp (key number, clob_col CLOB);
insert into temp values (10, empty_clob());
pos integer := 1;
for i in 1..12000 loop
v_clob := v_clob || 'a';
insert into temp values (20, empty_clob());
amt := LENGTH(v_clob);
select clob_col into lob_loc from temp where key=20;
DBMS_LOB.WRITE(lob_loc, amt, pos, v_clob);
working with LOB is a tough work, no mater what language you use,
such as java,oci,proc,prosql, you need use a special way, in ORACLE_HOME, there is a lots demos , you can find it .