Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> append a cursor (URGENT)
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 - 14:57:29 CST