You need to create a type.
create or replace type NUMBER_ARRAY as table of number; CREATE OR REPLACE PROCEDURE stored_p ( ntype IN NUMBER_ARRAY , p_ResultSet OUT TYPES.cursorType )
You can execute a loop with.
for i in 1 .. ntype.count loop dbms_output.put_line( ntype(i) ); end loop;
To check it out,
DECLARE ntypetest NUMBER_ARRAY := NUMBER_ARRAY (); BEGIN FOR i IN 1 .. 5 LOOP ntypetest.EXTEND; ntypetest (i) := i; END LOOP; stored_p(ntypetest,..)
There may be some changes in the syntax.
Of course, you can pass values โโseparated by commas, but this will be as a string. Your line should be something like 'val1','val2','val3' . You have to be careful when you have numbers, since the whole line will look like in ('2343,3444,2222') , which will be considered as one value instead of several numbers like in (2343,3444,2222)
source share