Home » SQL & PL/SQL » SQL & PL/SQL » help with PL SQL - error "invalid datatype"
help with PL SQL - error "invalid datatype" [message #305151] Sun, 09 March 2008 07:05 Go to next message
faz0062
Messages: 1
Registered: March 2008
Junior Member
Hi,

I'm getting this error:


CREATE TABLE CustAdd_Objtab OF CustAdd_Objtyp
*

ERROR at line 1:
ORA-00902: invalid datatype


Here is the code:

CREATE TYPE CustAdd_Objtyp AS OBJECT(

	AddId NUMBER(10),

	Line1 VARCHAR2(30),

	Line2 VARCHAR2(30),

	Line3 VARCHAR2(30),

	Country VARCHAR2(30),

	Postcode VARCHAR2(8)

);



----************** CustAdd Table ***************-----



CREATE TABLE CustAdd_Objtab OF CustAdd_Objtyp

OBJECT IDENTIFIER IS SYSTEM GENERATED;


Any ideas?

Thanks in advance!
Re: help with PL SQL - error "invalid datatype" [message #305155 is a reply to message #305151] Sun, 09 March 2008 09:12 Go to previous messageGo to next message
Frank Naude
Messages: 4502
Registered: April 1998
Senior Member
It works for me:

SQL> CREATE TYPE CustAdd_Objtyp AS OBJECT(
  2          AddId NUMBER(10),
  3          Line1 VARCHAR2(30),
  4          Line2 VARCHAR2(30),
  5          Line3 VARCHAR2(30),
  6          Country VARCHAR2(30),
  7          Postcode VARCHAR2(8)
  8  );
  9  /

Type created.

SQL>
SQL> CREATE TABLE CustAdd_Objtab OF CustAdd_Objtyp
  2  OBJECT IDENTIFIER IS SYSTEM GENERATED;

Table created.
Re: help with PL SQL - error "invalid datatype" [message #305156 is a reply to message #305151] Sun, 09 March 2008 09:15 Go to previous message
Michel Cadot
Messages: 64102
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Why are you posting this question in Expert forum?

It is clearly stated in the forum description: "Newbies should not post to this forum!"
Expert notion is defined in the sticky: Not an EXPERT? Post in the NEWBIES forum, NOT here
Rules are described in: OraFAQ Forum Guide
Follow them.

Regards
Michel

[Updated on: Sun, 09 March 2008 09:16]

Report message to a moderator

Previous Topic: UPDATING AND INSERTING DATA IN A TABLE IDENTICAL TO OTHER TABLE
Next Topic: Usage of package on a dynamically provided table name.
Goto Forum:
  


Current Time: Fri Dec 02 19:05:21 CST 2016

Total time taken to generate the page: 0.14419 seconds