Help! Sqlplus error: PLS-00201: The identifier 'ALTA_PREU' must be declared

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mark Soler
    New Member
    • Dec 2011
    • 1

    Help! Sqlplus error: PLS-00201: The identifier 'ALTA_PREU' must be declared

    Hi everybody!

    I have an error with a procedure when I call it from.

    Here the procedure code:

    create or replace procedure alta_preu (codiEspectacle in preus_espectacl es.Codi_Especta cle%type, codiRecinte in preus_espectacl es.Codi_Recinte %type, zona in preus_espectacl es.Zona%type, preu in preus_espectacl es.Preu%type, numerror out numeric) is
    begin
    insert into preus_espectacl es values(codiEspe ctacle, codiRecinte, zona, preu);
    numerror:=0;
    commit;
    exception
    when dup_val_on_inde x then
    numerror:=10;
    when others then
    numerror:=99;
    end;
    /

    Here the program that call procedure:

    variable res number;

    accept codiEspectacle prompt "Espectacle codi: "
    accept codiRecinte prompt "Recinte codi: "
    accept zona prompt "Zona del recinte: "
    accept preu prompt "Preu: "
    set verify off
    execute alta_preu (&codiEspectacl e, &codiRecinte , '&zona', &preu, :res);
    print res;
    undefine codiEspectacle;
    undefine codiRecinte;
    undefine zona
    undefine preu

    Here is the output error:

    BEGIN alta_preu (1022, 111, 'Pis', 12, :res); END;

    *
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00201: The identifier 'ALTA_PREU' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored


    I don't understand what happen. How to solve it? Could you help me?

    Thank you very much!!!

    Mark
  • rski
    Recognized Expert Contributor
    • Dec 2006
    • 700

    #2
    Do you use the same user for creation and execution of the procedure?

    Comment

    Working...