ORA-06572: Function ADD_NUM1 has out arguments

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • divya t

    ORA-06572: Function ADD_NUM1 has out arguments

    SQL> select add_num1(10,:nu m1) from dual;
    select add_num1(10,:nu m1) from dual
    *
    ERROR at line 1:
    ORA-06572: Function ADD_NUM1 has out arguments


    why is the error arising?
  • amitpatel66
    Recognized Expert Top Contributor
    • Mar 2007
    • 2358

    #2
    You cannot call a function from a select statement that has an OUT arguement.

    [code=oracle]

    SQL> ed
    Wrote file afiedt.buf

    1 create or replace function my_Test_func(a OUT NUMBER) RETURN NUMBER IS
    2 begin
    3 a := 20;
    4 return 10;
    5* end;
    SQL> /

    Function created.

    SQL> /
    select my_test_func(:n um1) from dual
    *
    ERROR at line 1:
    ORA-06572: Function MY_TEST_FUNC has out arguments


    SQL>
    [/code]

    ORA-06572: Function string has out arguments
    Cause: A SQL statement references either a packaged, or a stand-alone, PL/SQL function that contains an OUT parameter in its argument list. PL/SQL functions referenced by SQL statements must not contain the OUT parameter.

    Action: Recreate the PL/SQL function without the OUT parameter in the argument list

    Comment

    Working...