0

I'm a beginner to sql and I'm having troubling calling a stored procedure. I have put down the procedure, call, and error. I have been researching for hours trying to figure out why I'm getting this error. I am a database administrator. Oracle Database 11g Express Edition.

Thanks for any help.

Procedure

CREATE OR REPLACE PROCEDURE DISP_GUIDE_NAM (I_GUIDE_NUM IN GUIDE.GUIDE_NUM%TYPE) AS
    I_LAST_NAME   GUIDE.LAST_NAME%TYPE;
    I_FIRST_NAME   GUIDE.FIRST_NAME%TYPE;

SET SERVEROUTPUT ON;

    BEGIN
    SELECT LAST_NAME, FIRST_NAME
    INTO I_LAST_NAME, I_FIRST_NAME
    FROM GUIDE
    WHERE GUIDE_NUM=I_GUIDE_NUM;

    DBMS_OUTPUT.PUT_LINE(RTRIM(I_FIRST_NAME)||' '||RTRIM(I_LAST_NAME));

    END;
    /​

Call

begin
disp_guide_nam('AM01');
end;
/

Error:

ORA-06550: line 2, column 1:
PLS-00201: identifier 'DISP_GUIDE_NAM' must be declared
ORA-06550: line 2, column 1:
PL/SQL: Statement ignored

1. begin
2. disp_guide_nam('AM01');
3. end;
4. /

it should give me guide number, first name last name.

LOGH
  • 1
  • Can you prefix the schema name to the procedure, like `CREATE OR REPLACE PROCEDURE dbo.DISP_GUIDE_NAM (` – Arulkumar May 07 '19 at 03:22
  • Hi, thanks for the reply. I added the name of the schema, "MYSCHEMA", prefixed in from like you showed. `CREATE OR REPLACE PROCEDURE MYSCHEMA.DISP_GUIDE_NAM` Now I'm getting this error, same as before: `ORA-06550: line 2, column 1: PLS-00201: identifier 'DISP_GUIDE_NAM' must be declared ORA-06550: line 2, column 1: PL/SQL: Statement ignored 1. begin 2. disp_guide_nam('AM01'); 3. end; 4. / ` – LOGH May 07 '19 at 22:30

0 Answers0