I want to pass an array of primary keys to an Oracle stored procedure.
The Sample procedure is as follows
- Code: Select all
create or replace procedure get_arr (arr in report_varray)
is
outfile utl_file.file_type;
outline number;
begin
outfile := utl_file.fopen('IBIS2BIS','outputhn.txt','W',32767);
utl_file.put_line(outfile,'gestart');
for i in 1..arr.count loop
outline:=arr(i);
utl_file.put_line(outfile,outline);
end loop;
utl_file.fclose(outfile);
end;
/
the report_varray type is created by :
- Code: Select all
create or replace type report_varray is varray(1000) of number;
this works fine when i start the procedure in Oracle
- Code: Select all
sql> execute get_arr(report_varray(1,2,3,7,8,9,10,11,12,13,14,15));
but how do I call this procedure from within a method using an array of pk's as parameter ?
Regards,