Not query

A

Andrea

I have a database that tracks students and there courses.
What I want to do is create a query that when run shows a
list of names for all students that have not taken a
class. Every combination i try seems to give me nothing
correct....I have a Training table that charts information
for the class, a COURSE table that has further defined
attributes of the class (section number, meeting times
etc...) a RESULTS table that gives the student name and
all results and a PROFILE table that keeps general
information of the student. any help would be greatly
appreciated. thank you!!!!!!!!!!!!!!!!!!!!!!!
 
G

Gerald Stanley

You need to do a SELECT from the main Student table (which
I think is PROFILE) WHERE the Student primary key is not in
the Class table (which I think is TRAINING). It would be
something like
SELECT * FROM Profile WHERE studentId NOT IN (SELECT
DISTINCT studentId FROM Training)

Hope This Helps
Gerald Stanley MCSD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top