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 -> Re: Ref Cursors

Re: Ref Cursors

From: Jim Kennedy <kennedy-family_at_home.com>
Date: Thu, 30 Aug 2001 00:38:58 GMT
Message-ID: <CWfj7.443101$p33.8503917@news1.sttls1.wa.home.com>


No, because it is a cursor. Oracle does not retrieve all the results at once, it retrieves them as you ask for them. Jim
  "Steve" <sejohnson_25_at_yahoo.com> wrote in message news:3B8D50D7.51693092_at_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 - 19:38:58 CDT

Original text of this message

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