Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outer join - need to always show subtable data

Status
Not open for further replies.

jsolutions

Programmer
Jul 18, 2002
157
0
0
US
Basically, I have three tables:
tblStudents - StudentId and name of student
tblclasses - Classid, name of class, description of class
tblclassescompleted - studentid, classid, dateattended

Assume for the moment that there are 3 classes that each student is required to take (for now that is all that is in the classes table).

I am trying to create an output that shows each student's name, class name, description and date attended (or blank date if they have not attended). This is not a problem if they have actually attended the class.

The issue comes in when they have not taken the class (IE, dateattended is null). I want to be able to see the class name/desciprtion even if they have not yet attended the class so that I can tell what classes they still need to take.

I keep coming up with ambigous outer joins when I try this.

Any ideas would be greatly appreciated.
 

Is this a homework assigment? Sure looks like one.

Post your code and maybe someone will take pitty and help you.
[censored]

----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top