Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> HELP: ORA-06502
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
![]() |
![]() |