I am trying to select some records from a table using an array into the variable init_av_days but its not working out. init_av_days is to be committed to another table after this select query. How best do you suggest i do this?
declare
myarray APEX_APPLICATION_GLOBAL.VC_ARR2;
init_av_days varchar2(10);
begin
myarray := APEX_UTIL.STRING_TO_TABLE(:P592_AVAILABILITY_DAYS);
For i in 1.. myarray.count loop
select availability_days
into init_av_days
from sl_available_days
where location_code = :P592_LOCATION_CODE
and availability_days = myarray(i);
end loop;
end;