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 -> Re: Calling procedures from within packages

Re: Calling procedures from within packages

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 13 Mar 2002 22:08:40 +0100
Message-ID: <rqfv8ugrp7tij6pgbbk572c1i5tp2169ee@4ax.com>


On 13 Mar 2002 11:41:44 -0800, jmurdock_at_dialoguewizard.com (Sandy Murdock) wrote:

>To Start--
>
>The reasons why I need to do this are long and drawn out. But...
>
>What I need to do is call a number of procedures from a package,
>sometimes I need to return values to the package which are immediately
>dumped into a cursor and returned as a record set to Active Server
>pages (we have a number of Packages that return cursor/recordsets fine
>no issue there).
>
>An example of what we have done in SQL server would look like this:
>
>If @FirstName is Not Null And len(rtrim(@FirstName)) > 0
> Begin
> exec spSelectPersonByName1A @FirstName, @Lastname, @Active
> End
>Else
> Begin
> Insert into tempTable ( LastName, Active )
> exec spSelectPersonByName1B @LastName, @Active
> End
>
>
>I want to be able to write something like this for Oracle (what's
>there is a small section). The Idea is to have a number of re-useable
>procedures that the package will call and use as needed to either
>insert into a table or ultimately return to the browser via a cursor.
>
>I have not been able to return a recordset from an Oracle procedure. I
>know that I cannot return one to a web-browser but I thought I should
>be able to return one to a package so that it can use it.
>
>Is this not possible? Or do I have to use Cursors with the Next
>command to loop (rather than work with the cursor like a table using
>pl/sql)?
>
>I can do this by writing a very large package, but then the smaller
>components inside cannot be re-used.
>
>I may not be explaining this well. Any tips would be appreciated.
>
>thank you.

Check out the PL/SQL documentation, topic REF CURSOR Also, please try to use the search function of google before you are re-asking a question that must have been answered at least a 1000 times. Or search any FAQ resource

Regards

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Wed Mar 13 2002 - 15:08:40 CST

Original text of this message

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