I have a problem.
I have following sql statements in one SQL file:
CREATE OR REPLACE TYPE Banda AS OBJECT (
nr_bandy NUMBER(2)
, nazwa VARCHAR2(20)
, teren VARCHAR2(20)
, MAP MEMBER FUNCTION MapBanda RETURN NUMBER
);
CREATE OR REPLACE TYPE BODY Banda IS
MAP MEMBER FUNCTION MapBanda RETURN NUMBER IS
BEGIN
RETURN nr_bandy;
END;
END;
When I run those Create-Statements one by one (I mean select first create, ctrl + enter, then second one and ctrl + enter) I'll create those structures without any problems. But, if I try create them both (I mean Ctrl+A -> Ctrl + Enter) second one query seems to be aware of knowing about type 'Banda'.
I'm getting:
Type BANDA compiled
LINE/COL ERROR
--------- -------------------------------------------------------------
8/1 PLS-00103: Encountered the symbol "CREATE"
Errors: check compiler log
Is there any possibility to "commit" every single statement? Actually I have about 10-12 types created this way, so it's really annoying. I'm using Oracle SQL Developer.