Creating a Table Type of objects that include a Table Type.
Date: 19 Mar 2001 08:27:09 -0600
Message-ID: <6k4cbt42ntis4ailvq7k47tv3h15j58hkg_at_4ax.com>
I need to create a Type as a Table of a user defined type in which that type also has a Table type. Is this possible?
For example,
I have a list of projects so I create the folowing table table to
store them.
CREATE TYPE project_t AS TABLE OF VARCHAR2;
Each employee has a project so I create the employee as follows:
CREATE employee_t AS OBJECT
(
ID NUMBER,
EmpName VARCHAR2(36),
Project project_t
);
This allows me to have an employee object in which each employee can have multiple projects.
I now need an object for the departments which are made of many
employees so I must create a table type of employees using the
following statement:
CREATE TYPE empList_t AS TABLE OF employee_t;
I get follwong error:
PLS-00534: A Table type may not contain a nested table type or VARRAY.
I need this because my next step is to create view that is the department and containts a list of employees.
How can go about doing this? Am I missing something? Is there a work aroung?
Thanks,
Don Received on Mon Mar 19 2001 - 15:27:09 CET