Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: how to make a cursor variable from a index-by plsql table?
Thank you, Jonathan!
This is really a smart idea. It got me out of a deadlock.
I didn't do it because I though plsql function should be "stateless",
therefore it can not take non-static values. In other words, this
function can only be called within this package, not just from sqlplus.
I didn't create a dummy number table. I just get the sequence number by
ROWNUM from a select to a big table.
Thanks again.
Hang Chen
Hope this is enough to get you going.
--
Jonathan Lewis
Yet another Oracle-related web site: www.jlcomp.demon.co.uk
In article <7i1j3n$9vb$1_at_nnrp1.deja.com>,
hchen_at_time-0.com wrote:
> Hi,
> This is a re-post of my question yesterday - this problem has been
> driven me crazy. If the results stored in a index-by plsql table can
> not be returned by a cursor, I have to rewrite the whole package!
> Here is the question:
> I have an index-by plsql table of records(We are using Oracle 7.3).
It
> is well structured, and can be passed through several functions within
> the package. The last step requires me to make a cursor variable out
> from this table, and return this cursor to my java code, in which this
> plsql package is called.
> I have tried every way I can think of. I did read the plsql manual of
> 8i, it said nested plsql tables can be SQL manipulated, but this
feature
> is not available in my 7.3.
> Is there any way to work around, or am I hitting the limit of 7.3?
>
> : open return_this_cursor_to_java
> : for select bom_id, bom_type_code
> : from bom
> : where last_userid IN (select userid from
> my_index_by_plsql_table);
> ^^^^^^^^^^^^^^^^^^^^^^^
> It is a compile error. This does not work also:
> : where last_userid IN (my_index_by_plsql_table);
>
> Any hint would be approciated!
> Thanks a LOT.
> Hang Chen
>
> --== Sent via Deja.com http://www.deja.com/ ==--
> ---Share what you know. Learn what you don't.---
>
--== Sent via Deja.com http://www.deja.com/ ==-- ---Share what you know. Learn what you don't.--- Received on Thu May 20 1999 - 16:45:56 CDT
![]() |
![]() |