Click here to Skip to main content
15,886,095 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to do something like this :- I Defined an EmployeeType with the following

CREATE TYPE EmployeeType as OBJECT
(
emp_id VARCHAR2(5),
title VARCHAR2(15),
firstname VARCHAR2(20),
surname VARCHAR(25),
address AddressType,
tel_nosTelNoType,
MEMBER FUNCTION get_address RETURN VARCHAR2
)NOT FINAL;
and it compiled successfully. I was told to create a DepartmentType and I did that with the following command;

CREATE TYPE DepartmentType as OBJECT
(
dept_id VARCHAR2(3),
locations AddressType,
manager REF EmployeeType
)NOT FINAL;

It also compiled successfully but when I tried joining the two tables using sql command there was no information displayed, because the two tables were not properly related.

The problem here is how to relate the manager in the DepartmentType to the emp_id in the EmployeeType.I have not related the two properly. Am really confused about how to do the reference between the manager and the emp_id. Am stocked and I seriously need help.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900