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: DYNAMIC REF CURSORS Possible?

Re: DYNAMIC REF CURSORS Possible?

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 19 Dec 2001 16:20:10 -0800
Message-ID: <9vrarq01c7q@drn.newsguy.com>


In article <f329f8a7.0112190705.6cb44697_at_posting.google.com>, dlejeune_at_yahoo.com says...
>
>Ganesh -
>
>I did look at the documentation but it seemed as though you were
>required to perform some type of query to populate the ref cursor.
>Although you can used a weak typed ref cursor and have a dynamic query
>to populate it you still have to perform a query. My question is is I
>can build it manually through code and return it to the calling
>procedure to make it really seem like a cursor is being returned.
>

see
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:2270447621346

>=-Dave.
>
>ganesh_at_gtfs-gulf.com (Ganesh Raja) wrote in message
>news:<a8aed4.0112182336.1ddf5ccc_at_posting.google.com>...
>>dlejeune_at_yahoo.com (David LeJeune) wrote in message
>>news:<f329f8a7.0112181731.18715060_at_posting.google.com>...
>> > Hi -
>> >
>> > Quick question. Is there a way to BUILD a cursor within a PL/SQL
>> > stored procedure? We have some C++ libs making calls thru OCI and we
>> > return cursors with data to them.
>> >
>> > We have one procedure where we loop and generate what could be a
>> > cursor - but is not a query. We'd like to build the cursor
>> > dynamically and then return it. However, it seems like the only way
>> > to do it would be to create a temporay table, insert rows and then
>> > query those rows to return the cursor.
>> >
>> > There must be an easier way.
>>
>>The Easier way is to use ref Cursors ... Check out the documention on ref
>>Cursor.
>>
>>
>>
>> >
>> > thanks in advance,
>> > =-Dave.
>>
>> Regards,
>> Ganesh R

--
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 Wed Dec 19 2001 - 18:20:10 CST

Original text of this message

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