1 Reply Latest reply: Nov 30, 2009 5:42 PM by 701859 RSS

    STATIC METHODS

    701859
      Hi guys, i want create and use a static procedure, but i have a

      'ORA-04063: type body "A.TRATTA_TY" has errors'
      'ORA-06508: PL/SQL:could not find program unit being called'
      when I execute
      BEGIN
      tratta_ty.n('23','hi','bye');
      END;
      /

      Type ed procedure definition is listed below:

      CREATE TYPE TRATTA_TY AS OBJECT
      (
      p VARCHAR2(20),
      a VARCHAR2(20),
      km NUMBER,
      STATIC PROCEDURE n(p1 VARCHAR2,a1 VARCHAR2, km1 NUMBER)
      );
      CREATE TABLE TRATTA_TAB OF TRATTA_TY;

      CREATE TYPE BODY TRATTA_TY AS STATIC PROCEDURE n(p1 VARCHAR2, a1 VARCHAR2,km1 NUMBER ) IS
      BEGIN
      INSERT INTO TRATTA_TAB VALUES(tratta_ty(p1, a1, km1));
      END;

      Some idea?
      THANKS!!

      Edited by: user10877806 on 30-nov-2009 13.07

      Edited by: user10877806 on 30-nov-2009 13.56

      Edited by: user10877806 on 30-nov-2009 15.25