3 Replies Latest reply on Jul 27, 2007 6:39 PM by John Spencer

    ORA-06553: PLS-306: wrong number or types of arguments in call to 'OGC_X'

    545148
      Hi

      I'm having a similar problem to the one showed below :

      After executing
      -------------------------------------------------------------------------------------------------------
      SELECT *
      FROM dual x
      WHERE x.dummy IN (SELECT dummy
      FROM dual a
      WHERE a.dummy IN (SELECT d.dummy
      FROM (SELECT z.dummy
      FROM dual z
      WHERE x.dummy = z.dummy
      ) d));

      ---------------------------------------------------------------------------------------------------------
      Error : ORA-06553: PLS-306: wrong number or types of arguments in call to 'OGC_X'

      I know the query is stupid but it should work.

      Does anyone had the same problem ?

      Note: I'm using oracle 10R2

      Regards
      Tiago
        • 1. Re: ORA-06553: PLS-306: wrong number or types of arguments in call to 'OGC_X'
          121256
          I know the query is stupid but it should work.
          No. Correlated inline views are not supported.

          Your PL/SQL error does not related to your non-PL/SQL statement.
          • 2. Re: ORA-06553: PLS-306: wrong number or types of arguments in call to 'OGC_
            Kamal Kishore
            Can you post the output the way like below.
            SQL> SELECT *
              2  FROM dual x
              3  WHERE x.dummy IN (SELECT dummy
              4  FROM dual a
              5  WHERE a.dummy IN (SELECT d.dummy
              6  FROM (SELECT z.dummy
              7  FROM dual z
              8  WHERE x.dummy = z.dummy
              9  ) d));
            WHERE x.dummy = z.dummy
                  *
            ERROR at line 8:
            ORA-00904: "X"."DUMMY": invalid identifier


            SQL>
            What else are you doing in the database apart from running this query ?

            Are all objects valid on that database?
            • 3. Re: ORA-06553: PLS-306: wrong number or types of arguments in call to 'OGC_X'
              John Spencer
              I think you have somehting like this going on, possibly with a synonym
              SQL> CREATE PACKAGE x AS
                2     FUNCTION dummy(p_id IN NUMBER) RETURN NUMBER;
                3  END;
                4  /

              Package created.

              SQL> CREATE PACKAGE BODY x AS
                2  FUNCTION dummy(p_id IN NUMBER) RETURN NUMBER IS
                3  BEGIN
                4     RETURN p_id;
                5  END;
                6  END;
                7  /

              Package body created.

              SQL> SELECT *
                2  FROM dual x
                3  WHERE x.dummy IN (SELECT dummy
                4                    FROM dual a
                5                    WHERE a.dummy IN (SELECT d.dummy
                6                                      FROM (SELECT z.dummy
                7                                            FROM dual z
                8                                            WHERE x.dummy = z.dummy) d));
                                                        WHERE x.dummy = z.dummy) d))
                                                              *
              ERROR at line 8:
              ORA-06553: PLS-306: wrong number or types of arguments in call to 'DUMMY'
              What do you get from:
              SELECT owner, object_name, object_type
              FROM all_objects
              WHERE object_name = 'X';
              and if you get an object_type of synonym back then:
              SELECT * FROM all_synonyms
              WHERE synonym_name = 'X';
              John