Results 1 to 1 of 1
  1. #1
    Join Date
    Dec 2008

    Unanswered: Table connect issue

    Hi there!
    Hope you are all doing great .

    This is the problem I am having,
    Tables and fields
    member - memberID, forenames, memberType(lecturer, assistant)
    course - courseID, lecturerID, courseName
    class - classID, assistantID, courseID

    *lecturerID in course is a foreign key to memberID of member and assistantID in class is a foreign key to memberID of member as the member table keeps details about both course lecturers and class assistants.

    Basically tables are connected in this manner,
    SELECT m.forenames
    FROM member, course, class
    WHERE class.assistantID = member.memberID
    AND class.courseID = course.courseID
    AND course.lecturerID = member.memberID

    How can I display lecturer, assistant, courseName in different columns filtered by lecturer forenames and/or assistant forenames?
    If I say lecturer name is LIKE 'John%', it shouldn't filter by assistant name.

    It will save me a lot of time if I could achieve this without changing the table structure.

    Thanks in advance.

    Last edited by asela; 04-21-09 at 07:49.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts