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: AF <af_at_nospaming.com>
Date: Thu, 14 Mar 2002 10:54:11 -0800
Message-ID: <a6qrks$5bu$1@platform.uoregon.edu>


Tom
Book sales a little slow this month, or are your options in the crapper? ;)

"Thomas Kyte" <tkyte_at_oracle.com> wrote in message news:a6op1501iat_at_drn.newsguy.com...
> In article <ac4a5663.0203131141.224d222b_at_posting.google.com>,
> jmurdock_at_dialoguewizard.com says...
> >
>
>
> read
> http://osi.oracle.com/~tkyte/ResultSets/index.html
>
>
> >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.
>
> --
> Thomas Kyte (tkyte@us.oracle.com) http://asktom.oracle.com/
> Expert one on one Oracle, programming techniques and solutions for Oracle.
> http://www.amazon.com/exec/obidos/ASIN/1861004826/
> Opinions are mine and do not necessarily reflect those of Oracle Corp
>
Received on Thu Mar 14 2002 - 12:54:11 CST

Original text of this message

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