DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: in out parameters

  1. #1
    Join Date
    Jan 2002
    Posts
    152
    I have a procedure with some in out variables.But I have a problem when I try to call the from SQL*Plus.I get PLS-00363 error.I work with Oracle 8.1.7.
    Do I have to do something before calling the procedure with the in out variables?
    Thanks

  2. #2
    Join Date
    Apr 2002
    Location
    Germany.Laudenbach
    Posts
    448
    Hello;
    Yes;

    When you have declared IN/OUT then you need to declare vars's in SQL*PLUS for every IN/OUT-parameter.

    I do not know the SQL*PLUS-Syntax.
    But i use always an anonymus PL/SQL-Block to test procedures:

    DEFINE
    -- local vars
    BEGIN
    -- the code
    EXCEPTION WHEN OTHERS THEN
    -- exeption-handling
    END;
    /
    So i am not depending on SQL*PLUS-Syntax

    Orca




  3. #3
    Join Date
    Apr 2001
    Location
    Czechia
    Posts
    712
    An example for SQL*Plus:
    Code:
    scott@oracle> create or replace procedure test
      2    (p1 in out number, p2 in out number) as
      3  a number;
      4  begin a:=p1; p1:=p2; p2:=a; end;
      5  /
    
    Procedure created.
    
    scott@oracle> var v1 number
    scott@oracle> var v2 number
    scott@oracle> exec :v1:=1; :v2:=2;
    
    PL/SQL procedure successfully completed.
    
    scott@oracle> exec test(:v1,:v2);
    
    PL/SQL procedure successfully completed.
    
    scott@oracle> print
    
            V1
    ----------
             2
    
    
            V2
    ----------
             1
    Ales

Posting Permissions

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


Click Here to Expand Forum to Full Width