Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2006
    Posts
    20

    Unanswered: sqlplus problem with a procedure

    Hi,

    I'm working with sqlplus and I'm calling a procedure with input and outputs parameters.

    This is the procedure:

    create or replace procedure PROC_PRU(entpar in varchar2, salpar out varchar2) as
    begin
    dbms_output.put_line (entpar);
    salpar := 'retorno proc';
    end PROC_PRU;


    This is the call I make from sqlplus and the error I get.

    SQL> exec proc_pru('prueba', salpar);

    begin proc_pru('prueba', salpar); end;

    ORA-06550: línea 1, columna 26:
    PLS-00201: el identificador 'SALPAR' se debe declarar
    ORA-06550: línea 1, columna 7:
    PL/SQL: Statement ignored

    I try to declare the identifier salpar by a declare sentence or a define sentences but it doesn't work.

    How I have to declare the out parameter of the procedure.

    Any advice will be greatly apreciatted.

  2. #2
    Join Date
    Jan 2004
    Posts
    370
    Code:
    SQL> create or replace procedure PROC_PRU(entpar in varchar2, salpar out varchar2) as
      2  begin
      3  dbms_output.put_line (entpar);
      4  salpar := 'retorno proc';
      5  end PROC_PRU;
      6  /
    
    Procedure created.
    
    SQL> var salpar varchar2(20)
    SQL> exec proc_pru('prueba', :salpar);
    prueba
    
    PL/SQL procedure successfully completed.
    
    SQL> print salpar
    
    SALPAR
    --------------------------------
    retorno proc

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •