If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Object Type Queries in Oracle9i Help!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-10-03, 23:27
terriep1 terriep1 is offline
Registered User
 
Join Date: Sep 2003
Posts: 9
Object Type Queries in Oracle9i Help!

Hi,
I need help with an sql query that displays the last name of each student along with the first and last names of their advisors. I'm sure it can be done with and without calling the method. I would like help with both approaches if possible. I have 2 tables of student_type and faculty_type and Person_type is a super_type for both without a table.

create or replace type name_ty as object(
first varchar2(30),
last varchar2(30),
mi char(1),
member function get_fullname(
first IN varchar2,
last IN varchar2,
mi IN char
)return varchar2,
pragma restrict_references (get_fullname, RNDS, WNDS, RNPS,RNDS)
);
************************************************** *********
create type person_ty as object(
personName name_ty,
personAddress address_ty
) NOT FINAL;
************************************************** *******************

create type student_ty UNDER person_ty(
sid number(5),
phone varchar(10),
class char(2),
dob date,
fid number(5)
) NOT FINAL;
************************************************** ********************

create type faculty_ty UNDER person_ty(
fid number(5),
dept varchar2(4),
phone varchar2(10),
rank varchar2(8)
) NOT FINAL;
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On