Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Oracle8: CREATE TYPE BODY syntax: Need help
Hi, all--
I have just installed the Oracle8 beta, 8.0.2.0, on NT and am trying to
get up to speed by RTFM, but find them somewhat schizophrenic. I cannot
seem to create a type body. I have tried both the syntaxes given in
different on-line manuals, but still get an invalid body. Can someone
help? Here is the test code:
create type test_type as object
(test_gn number,
member function times2 return number,
pragma restrict_references(times2, WNDS, RNDS, WNPS, RNPS)
);
create type body test_type (
member function times2 return number is
v_rc number := test_gn*2;
begin
return v_rc;
end;
);
This one complains about the ')' on the last line. The next version complains about the 'END;' on the last line:
create type body test_type is
member function times2 return number is
v_rc number := test_gn*2;
begin
return v_rc;
end;
end;
/
Any help anyone can give is appreciated.
+-----------------------------------------------------
+-----------------------------------------------------Received on Fri Jul 25 1997 - 00:00:00 CDT