This is my first attempt at creating a package, so I must be missing something really really obvious (nothing that I've Googled for seems to even consider it worth mentioning).
Obviously, if you have procedures in your package body that are not included in the specification section, then those procedures are private. The problem I've got is that I can't seem to figure out how to reference those private packages once I've made them. And SQL Developer refuses to give me any message more useful than 'execution completed with warning', which doesn't help...
As an example, this is what I've been trying that doesn't work (just throws the aforementioned compiler error):
CREATE OR REPLACE PACKAGE BODY testPackage AS
PROCEDURE privateProc; --Forward declaration
PROCEDURE publicProc IS
BEGIN
EXECUTE privateProc();
END;
PROCEDURE privateProc IS
BEGIN
DBMS_OUTPUT.PUT_LINE('test');
END;
END testPackage;
I've also tried referring to it as testPackage.privateProc
, which hasn't worked either.
What am I doing wrong?