View Poll Results: Why is PL/SQL compile showing PLS-00410 error

Voters
0. You may not vote on this poll
  • You may post replies

    0 0%
  • You may post attachments

    0 0%
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2002
    Location
    USA
    Posts
    2

    Unanswered: PLS-00410 duplicate fields in RECORD, TABLE or argument list are not permitted

    I am getting PLS-00410 error - duplicate fields in RECORD, TABLE or argument list are not permitted.

    Here is what I am doing. I have a package header and a package body. The package header compiles successfully and the above error is displayed while compiling the package body only.

    The package header code looks like this
    1 CREATE OR REPLACE PACKAGE MAMNANN.NMMTEST
    2 AS
    3
    4 TYPE R_testrec IS RECORD (
    5 col1 INTEGER ,
    6 col2 VARCHAR2(10),
    7 col3 DATE
    8 ) ;
    9
    10 TYPE T_testrec IS TABLE OF R_testrec INDEX BY BINARY_INTEGER ;
    11 PROCEDURE Insert_rec (aIntegrityRec IN NMMTEST.R_testrec,
    12 pSuccessFailureFlag OUT INTEGER ) ;
    13 END NMMTEST;

    And the package body code looks like this:
    1 CREATE OR REPLACE PACKAGE BODY MAMNANN.nmmtest
    2 AS
    3 PROCEDURE Insert_rec (aIntegrityRec IN NMMTEST.R_testrec,
    4 pSuccessFailureFlag OUT INTEGER ) IS
    5 pSuccessFailureFlag INTEGER := 0 ; -- Default success returns 0
    6
    7 BEGIN
    8 null;
    9 END ;
    10 END NMMTEST;

    The compile points to the 3rd line in the package body for errors with the above mentioned error. There is no duplicate field name or argument name as the oracle error message says. It's a simple straight forward code. Can somebody help me if I am overlooking something?

    Thanks

  2. #2
    Join Date
    Feb 2002
    Location
    Sri Lanka
    Posts
    1
    I think that the line which you have said Default success returns 0 is causing the problem, although the error message says otherwise.

    If you rename that variable as I have done in the following code, you could get rid of the problem. But this depends on what you are attempting to perform with that variable.

    PACKAGE BODY NMMTEST AS
    PROCEDURE Insert_rec (aIntegrityRec IN NMMTEST.R_testrec,
    pSuccessFailureFlag OUT INTEGER) IS
    pSuccessFailureFlag2 INTEGER := 0 ; -- Default success returns 0

    BEGIN
    null;
    END ;
    END NMMTEST;

    If you need to have a default return value of 0, I would use the following code -

    PACKAGE BODY NMMTEST AS
    PROCEDURE Insert_rec (aIntegrityRec IN NMMTEST.R_testrec,
    pSuccessFailureFlag OUT INTEGER) IS

    BEGIN
    pSuccessFailureFlag := 0 ; -- Default success returns 0
    END ;
    END NMMTEST;

    I hope this helps.

    Regards
    Tamim

  3. #3
    Join Date
    Feb 2002
    Location
    USA
    Posts
    2
    Thanks Tamim. That worked.

Posting Permissions

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