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.
You're right that did it. I was trying to use it like the RecordCount property works in Delphi. Doh!
Thanks Knut!
-- Nick Hancock SCT Corporation nickhancock_at_charlestoncounty.org "Knut Talman" <knut.talman_at_mytoys.de> wrote in message news:3B093735.EC42DEA5_at_mytoys.de...Received on Mon May 21 2001 - 10:57:25 CDT
> 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