Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Oracle table databse
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 24-Feb-13 9:41am

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

  Print Answers RSS
0 OriginalGriff 285
1 DamithSL 265
2 CPallini 195
3 Maciej Los 175
4 George Jonsson 170
0 OriginalGriff 5,415
1 DamithSL 4,422
2 Maciej Los 3,820
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,911


Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 24 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100