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

Home -> Community -> Mailing Lists -> Oracle-L -> How to use a ref cursor inside a procedure ???

How to use a ref cursor inside a procedure ???

From: Janet Linsy <janetlinsy_at_yahoo.com>
Date: Wed, 03 Oct 2001 09:39:22 -0700
Message-ID: <F001.003A0C36.20011003095203@fatcity.com>

All,

I have s sp, which return a refcursor. If I used in the following way, it looks fine:

SQL> var k refcursor;
SQL> exec lp_tagetversion (:k);
SQL> print k;

      4000
----------
      4000

But how to use it inside a procedure? The following block compiles fine, I'd like the value in the refcursor k to be insert into kk, but I don't how to get the value out. Also k is defined using a precompiled package, which works fine. If don't use that package, how to declare k as a ref cursor?

declare

        k GLOBALPkg.RCT1;       --> syntax see below
        kk number;
begin
        lp_tagetversion (k);

end;

CREATE or REPLACE PACKAGE GLOBALpkg AS
TYPE RCT1 IS REF CURSOR;
END;

Thank you!

Janet



Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone. http://phone.yahoo.com
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Janet Linsy
  INET: janetlinsy_at_yahoo.com
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Oct 03 2001 - 11:39:22 CDT

Original text of this message

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