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

append a cursor (URGENT)

From: <sonukapoor_at_gmail.com>
Date: 4 Feb 2005 12:57:29 -0800
Message-ID: <1107550649.197661.256690@f14g2000cwb.googlegroups.com>


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

Original text of this message

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