How can i call procedure inside another procedure in Oracle?I'm trying as follow but i am getting that error "PLS-00306 (325: 13): PLS-00306: wrong number or types of arguments in call to 'TITLE_CRUD'"
PROCEDURE create_title(
P_TITLE varchar2,
P_USER varchar2,
P_ERR OUT VARCHAR2
)
IS
BEGIN
IF P_TITLE IS NULL THEN
P_ERR := 'Null value';
ELSE
title_crud('I',NULL,P_TITLE,P_USER);
END IF;
END;
PROCEDURE title_crud(
P_OP_TYPE VARCHAR2,
P_ID number,
P_TITLE varchar2,
P_USER varchar2,
P_ERR OUT VARCHAR2
)...
See the change below, the call to
title_crud
doesn't have a variable to hold what is being returned by it (p_err)An easy mistake to make but I find easier to avoid when calling a procedure you pass parameters by named notation. Your call to title_crud becomes