Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Oracle8: CREATE TYPE BODY syntax: Need help

Oracle8: CREATE TYPE BODY syntax: Need help

From: Dan Townsend <townsend_at_ebmud.com>
Date: 1997/07/25
Message-ID: <33D8BEE9.3885@ebmud.com>#1/1

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.

+-----------------------------------------------------

| Dan Townsend, Supervising Database Architect
| EBMUD Enterprise Object Designer
| mailto:townsend_at_ebmud.com
+-----------------------------------------------------
Received on Fri Jul 25 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US