Home » SQL & PL/SQL » SQL & PL/SQL » error in redaing clob record
error in redaing clob record [message #231217] Mon, 16 April 2007 01:13 Go to next message
ammishra
Messages: 179
Registered: January 2007
Location: india
Senior Member
Hi,

i am getting error to reading clob data type ...

declare 
out_xml clob;
l_buffer RAW(20000); 
l_text_buffer VARCHAR2(32767); 
nOffset number := 1;
iMaxSize integer := 32767;
iclobSize integer;
vBuffer varchar2(32767);
begin 
		
select a.RTF_FILE_DATA into out_xml from erat_report_rev_details a where rownum<2;

iclobSize := dbms_lob.getlength(out_xml);
dbms_lob.read(out_xml, iMaxSize, nOffset, vBuffer);
dbms_output.put_line(iclobSize||vBuffer);
end;


i am getting fallowing error.


declare
out_xml clob;
l_buffer RAW(20000);
l_text_buffer VARCHAR2(32767);
nOffset number := 1;
iMaxSize integer := 32767;
iclobSize integer;
vBuffer varchar2(32767);
begin

select a.RTF_FILE_DATA into out_xml from erat_report_rev_details a where rownum<

--DBMS_LOB.READ(out_xml,iMaxSize,nOffset ,l_buffer);
--l_text_buffer := UTL_RAW.CAST_TO_VARCHAR2(l_buffer);
iclobSize := dbms_lob.getlength(out_xml);

dbms_lob.read(out_xml, iMaxSize, nOffset, vBuffer);

dbms_output.put_line(iclobSize||vBuffer);

end;
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.DBMS_OUTPUT", line 57
ORA-06512: at line 19

--Yash
Re: error in redaing clob record [message #231244 is a reply to message #231217] Mon, 16 April 2007 01:57 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Lines in dbms_output.put_line are limited to 32K-1 in 10g, and 255 bytes before.

Regards
Michel
Re: error in redaing clob record [message #231263 is a reply to message #231244] Mon, 16 April 2007 02:41 Go to previous message
ammishra
Messages: 179
Registered: January 2007
Location: india
Senior Member
Thx Michel!!

now it is working ...

Previous Topic: ERROR : about utl_file package ....................
Next Topic: how to use dbs.random package effectively?
Goto Forum:
  


Current Time: Thu Dec 05 00:46:25 CST 2024