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: ResultSet from Stored Procedure

Re: ResultSet from Stored Procedure

From: Luciano Belotto <luciano_at_nospam.com>
Date: 25 Jun 2002 14:20:15 GMT
Message-ID: <af9u6v$dpa@dispatch.concentric.net>


Can you give a bit more help, here's what I'm trying:

CREATE OR REPLACE PACKAGE "ODB"."MYTYPES" as

    type cursorType is ref cursor;
end;

CREATE OR REPLACE PROCEDURE "ODB"."TRAX_CUST_RELEASE"     (RESULT_SET in OUT odb.myTypes.cursorTYPE) is
BEGIN
  OPEN RESULT_SET FOR select T."PROFILE", T."CUSTOMER_NAME" from odb.trax_customer_release T;
END; (the above by itself works fine)

i tried putting immediately after the open: RESULT_SET."PROFILE" := 'myValue';

but it doesn't let me. How does it have the sense of which record in the recordset set it is on when I do that?

--
Luciano Belotto
replace spam with traxsoftware for e-mail


"Daniel Morgan" <dmorgan_at_exesolutions.com> wrote in message
news:3D17858D.8198CAA3_at_exesolutions.com...

> Luciano Belotto wrote:
>
> > I guess what I'd like is just a simple example on how to do it. All I
see on
> > that previous example is him selecting a cursor then returning the
reference
> > to it. How would I go about modifying it? Do I fetch records out of the
> > cursor then modify them? Then how do i get those modified records into
> > another resultset to return?
> > --
> > Luciano Belotto
> > replace spam with traxsoftware for e-mail
> >
> > "Daniel Morgan" <dmorgan_at_exesolutions.com> wrote in message
> > news:3D177CA3.58E7FB1A_at_exesolutions.com...
> > > Luciano Belotto wrote:
> > >
> > > > sorry for extra posts.
> > > >
> > > > "Luciano Belotto" <luciano_at_nospam.com> wrote in message
> > > > news:af7rgv$h0o_at_dispatch.concentric.net...
> > > > > I've read the article at
> > > > http://osi.oracle.com/~tkyte/ResultSets/index.html
> > > > > but it only shows examples of returning a ResultSet which is a
cursor
> > > > (which
> > > > > itself was from a select)
> > > > >
> > > > > What I'd like to do is have a result set, then do some
manipulations
> > on
> > > > that
> > > > > data inside the stored procedure itself, then return the modified
> > > > resultSet.
> > > > > Can anyone give a simple example of this?
> > > > >
> > > > > --
> > > > > Luciano Belotto
> > > > > replace spam with traxsoftware for e-mail
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > >
> > > What is preventing you from modifying the values in the REF CURSOR
before
> > > returning it?
> > >
> > > Daniel Morgan
> > >
>
> If you create your cursor with something like:
>
> OPEN cvar FOR
> SELECT col1, col2
> FROM ....
>
> Then cvar.field_name can be changed as in:
>
> cvar.field_name := some_other_value;
>
> Just like with a static cursor.
>
> Daniel Morgan
>
Received on Tue Jun 25 2002 - 09:20:15 CDT

Original text of this message

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