Output particular group in query - URGENT

jawilli1

Registered User.
Local time
Today, 06:06
Joined
Apr 11, 2005
Messages
33
Hi Folks,
I have a table that has Student_ID, Course, and Grade. So each student has multiple records, one for each course they took. But what I want to return is only those people who have All F's. If I just put "F" as a criteria on the grade field then it will pump out those records that have an F, including those who maybe only have 1 F, but all I want is a list of Student_ID's of all of those people who have nothing but F's. Any ideas? HELP..i'm really in a bind with this one.
 
Code:
SELECT StudentID, Course, Grade FROM tblGrades 
WHERE StudentID Not In (SELECT StudentID FROM tblGrades WHERE Grade <> "F")
Not sure about the syntax, as I don't really use IN statements.
 

Users who are viewing this thread

Back
Top Bottom