Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Using CLOB

Using CLOB

From: Gustavo Badauy <gbadauy_at_my-deja.com>
Date: 2000/08/07
Message-ID: <8mn9v9$ncj$1@nnrp1.deja.com>#1/1

Hi,

I'm getting some errors when trying to use CLOB, it does not make any sense (at least for me). Here is the PL/SQL code.

Any ideas are welcome.

Thanks a lot.

The code is attached below.

create OR REPLACE FUNCTION aa (abc number) RETURN CLOB AS

    amt BINARY_INTEGER := 0;
    pos INTEGER := 0;
    i INTEGER;
    clob_loc BLOB;
    buffer varchar2(40);
begin

    buffer := 'abc';
    for i in 1..3 loop

        dbms_lob.write (clob_loc,amt, pos, buffer);
        pos := pos + amt;

    end loop;
end;
/

to call it i've used:
var c clob;
begin
:c := aa(12);
end;
/

The error I'm getting is

ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.DBMS_LOB", line 518
ORA-06512: at "BADAUY.AA", line 11
ORA-06512: at line 2


Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Aug 07 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US