Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: urgent???????
Sorry about my earlier answer, I through it out without checking. Please =
see article 67566.1 in metalink. What you want to use is the DBMS_SQL.COLUM=
N_VALUE_LONG procedure. This is specifically provided to return chunks of =
a long value from a cursor.
>>> Vadim Gorbunov <dim_at_protek.ru> 06/26/00 10:57AM >>>
Hi, Mohamed,
This script is from www.onwe.co.za=20
Hope this helps
Vadim
rem -----------------------------------------------------------------------=
rem Filename: readlong.sql
rem Purpose: Fetch Long column values piece-wise from PL/SQL
rem Date: 12-Jan-1999 rem Author: Frank Naude (frank_at_onwe.co.za) rem -----------------------------------------------------------------------=
set serveroutput on
DECLARE
cur1 PLS_INTEGER :=3D DBMS_SQL.OPEN_CURSOR;; rc NUMBER; long_piece VARCHAR2(256); piece_len INTEGER :=3D 0; long_tab DBMS_SQL.VARCHAR2S; long_len INTEGER :=3D 0;BEGIN
rc :=3D DBMS_SQL.FETCH_ROWS(cur1); -- Get one row
long_tab( NVL(long_tab.LAST, 0)+1 ) :=3D long_piece; -- Add piece to = table
long_len :=3D long_len + piece_len;
END LOOP;
DBMS_SQL.CLOSE_CURSOR(cur1);
DBMS_OUTPUT.PUT_LINE('Total long col fetched, len=3D'|| long_len);
Received on Mon Jun 26 2000 - 09:27:20 CDT
![]() |
![]() |