Trying to use 'Not Equal'

  • Thread starter Thread starter New2Access
  • Start date Start date
N

New2Access

I have two tables with employee numbers and other data.
Table A contains all employees who have ever worked for
the company. Table B contains all the employee who have
been terminated.

I am trying to select all employees from Table A who are
not on Table B. I have tried: Table A.employee <> Table
B.employee and other things but can't get it to work.

Does anyone know how to do this.

Thanks
 
suggest you start with the Find Unmatched Query Wizard. when you click New
from the Query tab in the database window, select that wizard from the list.
after building the query, post back to the newsgroups - query group - if you
have any problems tweaking it to get exactly what you want.

hth
 
Use Subquery ti get it:

SELECT tblA.* FROM tblA WHERE tblA.EmployeeNumber NOT IN (SELECT
tblB.EmployeeNumber FROM tblB)

Of course, EmployeeNumber value in both tables should be the same.
 
Hi,
Try using the Find Unmatched Query Wizard when you start a
new query to do this.
 

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

Back
Top