Query question



Hi , There,

I have created Training Database. The database contain 3
tables as following :
1- . First table contain the employees information such
as ID, Name, Location,..etc. 2- Second one contains the
courses that every employee must take and it's fields are
CourseCode and CourseName.
3- Third table contains the courses that already the
employees have taken , and it's fileds are CourseCode
only .

I have made relationship with Employee table and
the courses that they already have taken by ID. And
relationship with table 2 and 3 by CourseCode.

I want to make query to give me details about
Employee information and the of courses that he not yet
taken to enroll him in them.

Actually I tried to use Unmatched query but it
did not give me what I need.

Would you , please help me

Thank you Hamoud



Gerald Stanley

Try something along the lines of
SELECT YourFirstTable.[Name], YourSecondTable.CourseName
FROM YourFirstTable, YourSecondTable
WHERE YourSecondTable.CourseCode NOT IN (SELECT CourseCode
FROM YourThirdTable WHERE YourThirdTable.[ID] =

You will have to changeth etable and column names to suit
your database.

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