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

Home -> Community -> Usenet -> c.d.o.server -> Re: Extend Resultset

Re: Extend Resultset

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Tue, 09 Jul 2002 20:48:40 GMT
Message-ID: <3D2B4BFA.8954F2A1@exesolutions.com>


Jan van Toor wrote:

> Hello,
>
> With Interbase(Borland database) I can create Stored Procedures, which
> return resultsets. I
> have found out that it is possible do the same thing with Oracle, using
> packages and REF CURSOR.
>
> In Interbase, however, I was able to select a resultset, fetch each record
> of it, add some extra fields to the record (calculations etc) and after that
> SUSPEND the extended record.
>
> I have seen lots of examples in Oracle opening a cursor, but no example of
> adding extra info to a record and then return thát record.
>
> Could you send me such an example?
>
> Thanks in advance
> Jan van Toor

You can do it with any Oracle select statement.

SELECT fieldone, fieldtwo, 'this will work just fine' MYTEXT FROM any_table;

But there is no suspend in the formal sense. You can add extra fields to a cursor and then overwrite them as though they were variables at any time by refering to them by record_name.field_name.

Daniel Morgan Received on Tue Jul 09 2002 - 15:48:40 CDT

Original text of this message

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