I created a procedure to create a view dynamically using a shuttle item in APEX that returns the colon separated values. Here's the code to create it.
create or replace procedure create_temporary_view (input_employees in varchar2) is
begin
execute immediate 'create or replace view temp_batch_id as with emps(shuttle_item) as
(select '''||input_employees||''' from dual)
select regexp_substr(shuttle_item, ''[^:]+'', 1, level) batch_id from emps connect by level <= regexp_count(shuttle_item, '':'') + 1;';
commit;
end;
And inside the Execute PL/SQL code dynamic action i added the code something like
begin
create_temporary_view(:P12_EMPLOYEES);
end;
where :P12_EMPLOYEES is the shuttle item giving the colon separated values. Apparently this piece of code works when i do it from the SQL Commands tab in Oracle APEX but the procedure isn't getting called from the EXECUTE PL/SQL code dynamic action. Is there a specific reason for it? If yes, what is it? If not, what could be the possible errors? Thanks in Advance.