Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Ref Cursors

Ref Cursors

From: Steve <sejohnson_25_at_yahoo.com>
Date: Wed, 29 Aug 2001 15:30:16 -0500
Message-ID: <3B8D50D7.51693092@yahoo.com>


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

Original text of this message

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