Trying to use 'Not Equal'

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
 
T

tina

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
 
N

Norman Yuan

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.
 
Top