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: append a cursor (URGENT)

Re: append a cursor (URGENT)

From: <sonukapoor_at_gmail.com>
Date: 4 Feb 2005 14:11:28 -0800
Message-ID: <1107555088.437191.31970@g14g2000cwa.googlegroups.com>


Come on guys. There must be a solution for this one. It cant be that hard. Please help me out.

sonukapoor_at_gmail.com wrote:
> Hello,
>
>
> I am using a stored procedure, which gets an array passed. Now I
need
> to run the Select statement for each of the items in the array and
> return the complete result. Here is how it looks like:
>
> CREATE OR REPLACE PACKAGE BODY CUSTOM.MYPACK2 AS
> PROCEDURE Array_test(p_array IN numarray, thecur out outcur)
> IS
> i number;
> BEGIN
>
> for i in 1 .. p_array.count loop
> open thecur for
> SELECT
> somefield
> from
> sometable
> where
> someotherfield in (p_array(i))
> end loop;
> END Array_Test;
>
> END MYPACK2;
>
> However this returns me only the result for the last entry from my
> array. I think its because the cursor get overridden each time. Now
Is
> it possible to append the cursor so that I can get the complete
result
> or is there any other to achieve this?
>
> Please help this is very Urgent for me.
>
> Thanks in advance
Received on Fri Feb 04 2005 - 16:11:28 CST

Original text of this message

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