Hello,
I have been trying to write a procedure that should select the user ID and display their names. Below is the code that I have written, however, when I try to compile it, there are errors. Please someone help me as to where I'm going wrong with this code.
any help or guidance will be much appreciated. Thanks
SET R REPLACE PROCEDURE getDetails
(p_id IN PERSON_ATTRIBUTES.USER_ID%TYPE,
p_first_name out PERSON_ATTRIBUTES.FIRST_NAME%TYPE,
p_last_name out PERSON_ATTRIBUTES.LAST_NAME%TYPE)
is
begin
SELECT USER_ID, FIRST_NAME, LAST_NAME
INTO p_id, p_first_name, p_last_name
FROM PERSON_ATTRIBUTES
where USER_ID = p_id;
END;
/
DECLARE
p_first_name PERSON_ATTRIBUTES.FIRST_NAME%TYPE;
p_last_name PERSON_ATTRIBUTES.LAST_NAME%TYPE;
BEGIN
getDetails(308514267,p_first_name.FIRST_NAME,p_last_name.LAST_NAME);
DBMS_OUTPUT.PUT_LINE(p_first_name.FIRST_NAME, p_last_name.LAST_NAME);
END;
/