вот пример кода для вашего вопроса:
CREATE OR REPLACE PACKAGE MY_PACKAGE
AS
--You Can Comment below procedures if they are not needed out side of package and vice versa
--PROCEDURE PROCEDURE_1 (PARAM_1 IN VARCHAR2);
--PROCEDURE PROCEDURE_2 (PARAM_1 IN VARCHAR2);
--PROCEDURE PROCEDURE_3 (PARAM_1 IN VARCHAR2);*/
PROCEDURE CALLER (PARAM_1 IN VARCHAR2, CONDITION_1 IN CHAR);
END;
CREATE OR REPLACE PACKAGE BODY MY_PACKAGE
AS
PROCEDURE PROCEDURE_1 (PARAM_1 IN VARCHAR2)
AS
BEGIN
DBMS_OUTPUT.PUT_LINE ('PROCEDURE_1(' || PARAM_1 || ')');
END;
PROCEDURE PROCEDURE_2 (PARAM_1 IN VARCHAR2)
AS
BEGIN
DBMS_OUTPUT.PUT_LINE ('PROCEDURE_2(' || PARAM_1 || ')');
END;
PROCEDURE PROCEDURE_3 (PARAM_1 IN VARCHAR2)
AS
BEGIN
DBMS_OUTPUT.PUT_LINE ('PROCEDURE_3(' || PARAM_1 || ')');
END;
PROCEDURE CALLER (PARAM_1 IN VARCHAR2, CONDITION_1 IN CHAR)
AS
BEGIN
CASE (CONDITION_1)
WHEN '1'
THEN
PROCEDURE_1 (PARAM_1);
WHEN '2'
THEN
PROCEDURE_2 (PARAM_1);
WHEN '3'
THEN
PROCEDURE_3 (PARAM_1);
ELSE
DBMS_OUTPUT.PUT_LINE ('Unknown Condition: [' || CONDITION_1|| ']');
END CASE;
END;
END;
BEGIN
MY_PACKAGE.CALLER ('Hello World!', '1');
MY_PACKAGE.CALLER ('Hello World!', '2');
MY_PACKAGE.CALLER ('Hello World!', '3');
MY_PACKAGE.CALLER ('Hello World!', '4');
END;
выход
PROCEDURE_1(HELLO WORLD!)
PROCEDURE_2(HELLO WORLD!)
PROCEDURE_3(HELLO WORLD!)
UNKNOWN CONDITION: [4]