| DECLARE | |
| l_selected APEX_APPLICATION_GLOBAL.VC_ARR2; | |
| BEGIN | |
| -- Convert the colon separated string of values into | |
| a PL/SQL array | |
| l_selected := APEX_UTIL.STRING_TO_TABLE(:P10_DEPTNO); | |
| -- Loop over array to insert department numbers and sysdate | |
| FOR i IN 1..l_selected.count | |
| LOOP | |
| INSERT INTO report_audit_table (report_date, selected_department) | |
| VALUES (sysdate, l_selected(i)); | |
| END LOOP; | |
| END; |

0 Comments