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

Home -> Community -> Usenet -> c.d.o.misc -> REF CURSOR

REF CURSOR

From: jeperkins4 <johnp_at_1rent.com>
Date: Thu, 18 Nov 1999 08:35:45 GMT
Message-ID: <810dp1$b4t$1@nnrp1.deja.com>


Is there an easy way to get a result set in one procedure/function that calls another procedure/function that returns a reference cursor?

function getUser

   (p_UserID in integer)
    return types.cursorType is

     l_cursor types.cursorType;
   begin

     open l_cursor for
        select

a.UserID,UserName,UserPassword,FirstName,LastName,SSN,DateOfBirth,

DriversLicense,LicenseStateID,Email,CompanyName,HasWebsite,MustChangePas sword,

          TermsAccepted,a.LastUpdated
        from common.users a, common.userdetails b
        where a.userid = b.userid(+)
          and a.UserID = p_UserID;

    return l_cursor;
  end;

How would I loop through the return values of getUser(2)?

--
Database Applications Engineer
Rentals.com
459 Hamilton Ave, Suite 202
Palo Alto, CA 94301

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Nov 18 1999 - 02:35:45 CST

Original text of this message

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