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

Home -> Community -> Mailing Lists -> Oracle-L -> urgent??????????

urgent??????????

From: Mohamed Gad <mgad_at_itsoft.com.eg>
Date: Wed, 28 Jun 2000 02:15:13 +0300
Message-Id: <10541.110517@fatcity.com>


Vadim,william
Thanks a lot for your corporation but i tried the script you forward to me and i get the following error.
ORA-932,ORA-06512 when selecting a long raw column using Dynamic SQL. Selecting other types of columns works fine. so if any one else know how to solve this or have another solution please send me as soon as possible(found below the suggested script to select long raw greater than 32760).

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         := DBMS_SQL.OPEN_CURSOR;;
  rc         NUMBER;
  long_piece VARCHAR2(256);
  piece_len  INTEGER             := 0;
  long_tab   DBMS_SQL.VARCHAR2S;
  long_len   INTEGER             := 0;

BEGIN
  DBMS_SQL.PARSE(cur1, 'select longcol from longtable', DBMS_SQL.NATIVE);   DBMS_SQL.DEFINE_COLUMN_LONG(cur1, 1);
  rc := DBMS_SQL.EXECUTE(cur1);
  rc := DBMS_SQL.FETCH_ROWS(cur1);                       -- Get one row

     long_tab( NVL(long_tab.LAST, 0)+1 ) := long_piece; -- Add piece to table

     long_len := long_len + piece_len;
  END LOOP;
  DBMS_SQL.CLOSE_CURSOR(cur1);
  DBMS_OUTPUT.PUT_LINE('Total long col fetched, len='|| long_len); END;
/

Best Regards
Mohamed Gad
ITSoft, The software Factory of International Turnkey Systems (ITS)

16 Lebanon st., Mohandeseen, Giza, Egypt Tel: +20-2-3048561/2/3
Fax: +20-2-3048564 Received on Tue Jun 27 2000 - 18:15:13 CDT

Original text of this message

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