Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Ref Cursors
Is there a way to find out how many rows are going to be returned from a
Ref Cursor.
Version Oracle 8.1.7
Here's what I'm trying to do:
FUNCTION test return ref_cursor_def.cursor_type IS
irowcount number;
l_cursor ref_cursor_def.cursor_type;
BEGIN
OPEN l_cursor FOR SELECT custid, mailbox, permission FROM user_profile; irowcount := l_cursor%rowcount;
dbms_output.put_line('Count ' || irowcount);
return(l_cursor);
EXCEPTION WHEN others THEN
dbms_output.put_line('Error ' || irowcount);
END test;
I've also tried SQL%Rowcount which returns null. Metalink shows an example using SQL%rowcount but I couldn't get that to work.
Any help would be appreciated.
Thanks... Received on Wed Aug 29 2001 - 15:30:16 CDT