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 -> Re: Cursor in PL/SQL function never returns data.

Re: Cursor in PL/SQL function never returns data.

From: Knut Talman <knut.talman_at_mytoys.de>
Date: Mon, 21 May 2001 17:41:41 +0200
Message-ID: <3B093735.EC42DEA5@mytoys.de>

Hi Nick,

> The following function is inside a package called Conversion_PKG. Its full
> of stuff I'm using on a data conversion and will not be needed once the new
> system is in production. The NewValue column is Number(12) the others are
> VarChar2(30), except for the OldDescription column which is Varchar2(50).

< code snipped >

> IF NewValCur%RowCount > 0
> THEN
> FETCH NewValCur INTO TheNewValue;
> END IF;
NewValCur%RowCount is always 0, even if there are 2000 rows selected by the cursor, so no row will ever be fetched. Just rewrite your code here and you will be successful.

Regards,

Knut

-- 
Knut Talman                                     Fon +40 30 72 62 01 411
dba_at_myToys.de                                   Fax +49 30 72 62 01 222
          The degree of normality in a database is inversely             
                    proportional to that of its DBA
Received on Mon May 21 2001 - 10:41:41 CDT

Original text of this message

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