Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> At the 4000 limit for LOBs in SQL
Anyone seen behaviour like this before ?
rem
rem simple table
rem
SQL> create table blah (i number, x clob);
Table created.
rem
rem Add a row that I construct (i=1), and then
rem insert a row from an existing table (which
rem also contains a clob)
rem
SQL> declare
2 r varchar2(32000) := rpad('*',20000,'*');
3 begin
4 insert into blah values (1,r);
5 insert into blah select 2,email
6 from email_content where id = 418830;
7 commit;
8 end;
9 /
PL/SQL procedure successfully completed.
rem
rem So lengthwise the two lobs are similar
rem
SQL> select i, dbms_lob.getlength(x) from blah;
I DBMS_LOB.GETLENGTH(X)
---------- --------------------- 1 20000 2 19743
rem
rem And the first lob looks fine...
rem
SQL> select dbms_lob.substr(x,3999,1)
2 from blah where i = 1;
DBMS_LOB.SUBSTR(X,3999,1)
rem
rem Whereas the second lob does not!
rem
SQL>
SQL> select dbms_lob.substr(x,3999,1)
2 from blah where i = 2;
select dbms_lob.substr(x,3999,1)
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character
string buffer too small
ORA-06512: at line 1
Ideas anyone ?
Cheers
Connor
"Some days you're the pigeon, some days you're the statue"
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: =?iso-8859-1?q?Connor=20McDonald?= INET: hamcdc_at_yahoo.co.uk Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Mon Mar 25 2002 - 09:53:21 CST
![]() |
![]() |