Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Cursor in PL/SQL function never returns data.
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 DBAReceived on Mon May 21 2001 - 10:41:41 CDT