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 -> HELP: ORA-06502

HELP: ORA-06502

From: <susana73_at_hotmail.com>
Date: 2000/06/01
Message-ID: <8h6raf$ksk$1@nnrp1.deja.com>#1/1

Hi all,

I am having problem finding the LENGTH of a LONG datatype in my table. I have a PL/SQL code(below) which generates the length of a LONG field. However, it fails when it hits a LONG field which is bigger than 32K. The error is ORA-06502. Is there any work around?

I appreciate your help.

Susan

DECLARE
    length_var NUMBER(38);
    CURSOR long_cursor IS
    SELECT id,output FROM mytable;
    verylong_val long_cursor%ROWTYPE;
BEGIN
    OPEN long_cursor;
    LOOP
    FETCH long_cursor INTO verylong_val;     EXIT WHEN long_cursor%NOTFOUND;
    length_var := LENGTH(verylong_val.output);     DBMS_OUTPUT.PUT_LINE(verylong_val.id || '|' || length_var);     END LOOP;
    CLOSE long_cursor;
END;
/

 mytable:

 Name                            Null?    Type
 ------------------------------- -------- ----
 ID                              NOT NULL NUMBER(10)
 OUTPUT                                   LONG



Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Jun 01 2000 - 00:00:00 CDT

Original text of this message

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