Query

I have a course and student tracking database (Access and ASP)
Tbl1 (empId, Name) is a list of ALL students Tbl2 (couresID, Title) is a list of ALL available courses Tbl 3 (empid, couresID) is a list of  the students and the courses they registered for. So far so good, i  pull reports on who registered to a certain course and what course a student is registered for.
I got this weird request from my mangers to pull a report that would show all the student
that didn't register to specific course.

I tried unsuccessfully to create this query. I hope there is way to do it or someone
that can guide me in the right direction, like you guys dome many times in the Past.

Thank You all in advanced.
alberteAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lee W, MVPTechnology and Business Process AdvisorCommented:
I'm not sure if Access supports nested subqueries, but if so, I think this will work:

Select EmpID, Name FROM tbl1 WHERE empid NOT IN (Select distinct empid FROM tbl3)
0
alberteAuthor Commented:
Intresting. I would like to refine this query to show all the students that that are not registred to a specific course (say only  where tbl2 course ID = 4).
Thanks.
0
Lee W, MVPTechnology and Business Process AdvisorCommented:
Select EmpID, Name FROM tbl1 WHERE empid NOT IN (Select distinct empid FROM tbl3 WHERE CourseID = 4)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

alberteAuthor Commented:
One more little thing.
 I need to students (from Tbl1) where the empid > 1330

Thank for everything.
0
alberteAuthor Commented:
Never mind, got it.
0
Lee W, MVPTechnology and Business Process AdvisorCommented:
Aren't nested subqueries fun!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.