Results 1 to 2 of 2

Thread: Pls-00410

  1. #1
    Join Date
    Aug 2011
    Posts
    2

    Unanswered: Pls-00410

    Hi

    I am getting below error message when i compile a function.

    SQL>
    SQL> ALTER FUNCTION P10.FN_T COMPILE;

    Warning: Function altered with compilation errors.

    SQL>
    SQL> show error
    Errors for FUNCTION P10.FN_T:

    LINE/COL ERROR
    -------- -----------------------------------------------------------------
    0/0 PL/SQL: Compilation unit analysis terminated
    1/1 PLS-00410: duplicate fields in RECORD,TABLE or argument list are
    not permitted

    SQL>
    SQL>

    here is the code of the function.

    CREATE OR REPLACE function JAM.fn_t (t out number) return varchar2
    is
    t number(5) := 10 ;
    a number(5) := 10 ;
    o varchar2(10) := 'test';
    begin
    a := t;
    dbms_output.put_line('t'||a);
    dbms_output.put_line('0'||o);
    return o;
    end;
    /

    Can somebody help me to fix the error?

    Thanks

  2. #2
    Join Date
    Mar 2007
    Posts
    623
    Quote Originally Posted by Bourbon View Post
    Can somebody help me to fix the error?
    Hi,
    simply do not use the same name T for OUT parameter and local variable.
    Renaming one of them would be probably the best option. Or, as the assignment (A := T) is valid only for the local variable, you could get rid of the OUT parameter at all. As you did not post what is this function supposed to do, I cannot suggest you more.

Posting Permissions

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