PL/SQL Cursor-attribute %ROWCOUNT
Hi to everybody,
I have a question regrading to Cursor attributes.
I'm written a funtion(you can see the code below) with REF CURSOR as its Return value.
Now I want to use the Cursor Attribute ROWCOUNT to check out how many rows the function gives back, but I always become 0.
The funtion itself work without any problems except for the ROWCOUNT Attribute which gives always 0 back.
Can somebody told me what I make wrong????
Thanxxx
Schoeib Amin
Create or Replace Function PIFS.indizierteWerte_fr_test
(match IN string,
Dauer IN number)
return
types.cursorType --Package where I defined a REF CURSOR TYPE
AS
Rate1 number;
match_ VARCHAR2(15);
c_cursor types.cursorType;
Anfangsdatum date;
jetziges_datum date;
Anzahl number;
BEGIN
match_:=match;
Anfangsdatum:=gebe_anfangsdatum(Dauer);
jetziges_Datum:=sysdate;
Rate1:=berechne_fr(match_,Anfangsdatum);
OPEN c_cursor FOR
Select
(fr.indiziert)*Rate1 INDIZIERT,fr.DATUM
from
fondsreihe fr
where
fr.match=match_
and fr.Datum between Anfangsdatum and to_char(jetziges_Datum,'DD.MM.YYYY') order by fr.DATUM;
anzahl:=c_cursor%ROWCOUNT;
dbms_output.put_line(anzahl);
return c_cursor;
END indizierteWerte_fr_test;