Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

StackOverflow Point

StackOverflow Point Navigation

  • Web Stories
  • Badges
  • Tags
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Web Stories
  • Badges
  • Tags
Home/ Questions/Q 3385
Alex Hales
  • 0
Alex HalesTeacher
Asked: June 2, 20222022-06-02T12:01:49+00:00 2022-06-02T12:01:49+00:00

oracle – too many declaration of a construct match this call

  • 0

[ad_1]

I have declared an object with a constructor that takes 2 arguments. I can’t use it because oracle returns:

[Error] Execution (2: 10): ORA-06553: PLS-307: too many declarations
of ‘BOUNDARY’ match this call

  • I haven’t declared this constructor more than one time.

  • My code is working on db fiddle but not on my database. The only difference between the code on dbfiddle and my code is that this object has an owner.

  • Therefore the name of the object is defined this way: owner_name.object_name.

  • I have checked if the object is defined in another owner. And when I call the constructor I use owner_name.constructor.

  • I’ve created a dummy constructor that take 0 arguments and it works.

_

CREATE OR REPLACE TYPE boundary AS OBJECT
(
    v_start INTEGER,
    v_end INTEGER,
    CONSTRUCTOR FUNCTION boundary (i_start INTEGER, i_end INTEGER)
        RETURN SELF AS RESULT,
    MEMBER FUNCTION isInside (i INTEGER)
        RETURN INTEGER
);

CREATE OR REPLACE TYPE BODY BV_OWN.boundary
AS
    CONSTRUCTOR FUNCTION boundary 
        RETURN SELF AS RESULT
    IS
    BEGIN
        v_start := 1;
        v_end := 2;
        RETURN;
    END;
    
    CONSTRUCTOR FUNCTION boundary (i_start INTEGER, i_end INTEGER)
        RETURN SELF AS RESULT
    IS
    BEGIN
        v_start := i_start;
        v_end := i_end;
        RETURN;
    END;

    MEMBER FUNCTION isInside (i INTEGER)
        RETURN INTEGER
    IS
    BEGIN
        IF v_start <= i AND i <= v_end
        THEN
            RETURN 1;
        ELSE
            RETURN 0;
        END IF;
    END;
END;

SELECT ( bv_own.boundary(1,2)) FROM DUAL; --doesn't work

[Error] Execution (2: 10): ORA-06553: PLS-307: too many declarations of ‘BOUNDARY’ match this call

SELECT ( bv_own.boundary()).isInside(1) FROM DUAL; --is working

1

[ad_2]

  • 0 0 Answers
  • 12 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report
Leave an answer

Leave an answer
Cancel reply

Browse

Sidebar

Ask A Question

Related Questions

  • xcode - Can you build dynamic libraries for iOS and ...

    • 0 Answers
  • bash - How to check if a process id (PID) ...

    • 8037 Answers
  • database - Oracle: Changing VARCHAR2 column to CLOB

    • 1840 Answers
  • What's the difference between HEAD, working tree and index, in ...

    • 1919 Answers
  • Amazon EC2 Free tier - how many instances can I ...

    • 0 Answers

Stats

  • Questions : 43k

Subscribe

Login

Forgot Password?

Footer

Follow

© 2022 Stackoverflow Point. All Rights Reserved.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.