CLob update failing with PLS-00172: string literal too long
956624Aug 20 2012 — edited Aug 20 2012I have a clob column which needs to updated with a message on message_id
Table description
SQL> desc cl_message1
Name Null? Type
----------------------------------------- -------- ----------------------------
MSG_ID NOT NULL NUMBER(10)
DATA NOT NULL CLOB
Update statement:
variable data1 clob;
begin
:data1:='TESTHDR^Add^200812310374^2012-08-19 15:53:22.0^
TESTHDR^Add^200812310374^5652^C0000029^2012-08-19 15:46:49.0^
TESTDWN^ADD^200812310374^5652^G^03^00000999990000722444^
.....
... ----------------------------------------------------------------------------------------- 2376 lines of text-------------------------
TESTDWN^ADD^200812310374^5674^G^10^00000999990000743289^
TESTEND^5674^';
UPDATE cl_message1
SET DATA=:data1
WHERE
msg_id = '989';
END;
/
When I run this statement it fails with
SQL> @test_clob_insert.sql
:data1:='WAVEHDR^Add^200812310374^2012-08-19 15:53:22.0^
*
ERROR at line 2:
ORA-06550: line 2, column 10:
PLS-00172: string literal too long
As per my understanding a bind variable can store maximum value of clob. Not sure why this is throwing this error. Please help
Regards
This column is stored in_row.
SQL> r
1* select owner,table_name,column_name,in_row from dba_lobs where table_name='CL_MESSAGE1'
OWNER TABLE_NAME COLUMN_NAME IN_
------------------------------ ------------------------------ ---------------------------------------- ---
VEERA CL_MESSAGE1 DATA YES
Edited by: 953621 on Aug 19, 2012 10:34 PM
Edited by: 953621 on Aug 19, 2012 11:44 PM