Hi guys, I am fairly new in Apex and still struggling on some basic things like debugging this PL/SQL procedure. Hopefully someone can help me on this:
I made this PL/SQL procedure to do some insert operations by looping through another table's records:
DECLARE
l_test_id number := :P5_ID;
l_test_type varchar2(50) := :P5_TEST_TYPE;
CURSOR c_criteria is
SELECT ID FROM DR_APP_TABLETOP_CRITERIA;
BEGIN
IF l_test_type = 'Tabletop' THEN
FOR r_criteria IN c_criteria
LOOP
INSERT INTO DR_APP_TABLETOP_WORKBOOK(ID_TEST, ID_CRITERIA)
VALUES (l_test_id, r_criteria.ID);
END LOOP;
COMMIT;
END IF;
END;
There is no error on the Apex debugger, but the INSERT operations never happened. Does anyone notice error in this code? Or, can someone teach me on how to print simple log message on the debugger? Something like "System.out.println()" in Java - so I can debug the PL/SQL easier. Surprisingly this thing is not easy to find on the Internet: I tried DBMS_OUTPUT and APEX_DEBUG functions but got no luck - probably I was doing it wrong .... Any help will be appreciated!
In case you wonder, I used Apex v5.0.4.
Thank you!