Home » Other » Training & Certification » join (8i, 2k)
join [message #287607] Wed, 12 December 2007 22:12 Go to next message
rzkhan
Messages: 370
Registered: March 2005
Senior Member

I have Instructors table.

instructor_id     pk
instructor_name



and offered courses table (focd)


course_seq_no   pk
semester
year
inst1_code  
inst2_code
inst3_code


The requirement is that one course can be offered by more than one instructor per semester.


How can I get the following output using join of two tables



Course_seq_no     instructor1_name            instructor2_name	instructor3_name	
1			Dr Peter		Dr. Alex		
2			Dr. Sam
3			Dr. Simon		Dr. Qez		Dr. Rz












Re: join [message #287608 is a reply to message #287607] Wed, 12 December 2007 22:17 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
pivot query should work for you
Re: join [message #287611 is a reply to message #287608] Wed, 12 December 2007 22:48 Go to previous messageGo to next message
rzkhan
Messages: 370
Registered: March 2005
Senior Member
could you give me please a slight example. I searched for pivot query but could not get required results.

Thank
Re: join [message #287613 is a reply to message #287607] Wed, 12 December 2007 22:54 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
This question is asked & answered weekly on this forum.
If none of the existing code make sense to you, then I am not about to complete your homework for you.
Re: join [message #287658 is a reply to message #287613] Thu, 13 December 2007 01:22 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Have you seen this demonstration script?

MHE
Previous Topic: OUT & IN OUT
Next Topic: Need Research topic about Data Warehousing
Goto Forum:
  


Current Time: Sat Nov 23 17:54:25 CST 2024