Hello,
I am trying to find a way to unpersist package variables on the same execution (can't use pragma SERIALLY_REUSABLE on package because I can't modify it).
The following is an example of what I am trying to do:
BEGIN
DELETE tabla_1;
COMMIT;
global_package.variable_1:='hello';
INSERT INTO tabla_1 (column_1) VALUES (global_package.variable_1);
DBMS_SESSION.MODIFY_PACKAGE_STATE(1); --this is not working
DBMS_SESSION.MODIFY_PACKAGE_STATE(2); --this is not working
DBMS_SESSION.RESET_PACKAGE; -- this is not working
--global_package.variable_1:=null; -- I can't use this because in the real application I have many unknown package variables.
INSERT INTO tabla_1 VALUES (global_package.variable_1);
END;
/
SELECT *
FROM tabla_1;
The output is:
column_1
----------
hello
hello
The desired output is:
column_1
----------
hello
(null)
Thanks in advanced.