Solved

Query table and only return results NOT in another table in ACCESS

Posted on 2014-11-25
2
166 Views
Last Modified: 2014-11-25
I have 2 tables Humres with a field em_id and another table (dbo_emptrain) that has a field empID.  The Humres table has ALL employees listed in it, the emptrain table has only employees that we have assigned something in this database.  I want to run a query that shows me only employees that haven't been assigned to the emptrain table.
0
Comment
Question by:sharris_glascol
2 Comments
 
LVL 35

Accepted Solution

by:
PatHartman earned 500 total points
ID: 40464495
If you don't know how to create a left join, then use the "unmatched" wizard to create the query for you.

Select ...
From tblA Left Join tblB On tblA.em_id = tblB.empID
Where tblB.empID Is Null;
0
 

Author Closing Comment

by:sharris_glascol
ID: 40464511
Thanks I have done numerous queries and feel dumb this was so simple.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question