5 Replies Latest reply: Dec 26, 2011 10:07 AM by Oracle_Walker RSS

    How to pass NUMBER parameter to procedure from SQL script?

    Oracle_Walker
      I need to pass NUMBER parameter(OUT) to a PL/SQL stored procedure. I am invoking this procedure from a SQL script.
      set long 100
      set pages 0
      set trimspool on
      set serveroutput on
      set echo off
      set terminal off
      variable out NUMBER
      begin
              pack.proc(:out);
      end;
      / 
      When i tried pass the NUMBER parameter as shown above, it throws

      ERROR at line 2:
      ORA-06550: line 2, column 9:
      PLS-00306: wrong number or types of arguments in call to 'pack'
      ORA-06550: line 2, column 9:
      PL/SQL: Statement ignored

      I am invoking the SQL script from a shell script. Please suggest me how can i get this out parameter in a shell variable?