A select query that compares two table

  • Thread starter Thread starter Craig_B
  • Start date Start date
C

Craig_B

Hi,

Any insight greatly appreciated.

I have 2 tables, both containing a "task to do" field.

The first table is a listing of all "tasks to do" defining what tasks are to
be done by people who work in a specific job position. (each person has one
job position and has to complete all of their job position's tasks that are
listed as part of this table)

The second table is a listing of all the person's "tasks to do" that have
been done, with some of the tasks done by that person being tasks that are
required of their job position requirements listed in the first table and
other tasks done by that person are just general tasks that are not part of
any specific job position.

I want to compare the second table to the first and pull out of the second
table ONLY those tasks that a person has done that are part of their required

job position EXCLUDING those tasks from the second table that are not part of

that persons job postion.

Is this done with a query using SQL view ...? Could you provide any generic
code as I am new to sql and vba programming.

THANK YOU VERY MUCH

Craig_B
 
Would a select query work based on both tables with joins on [person] and
[tasks to do]? This will only return results where tasks are assigned to a
person. IOW, non-matches won't be part of the result.

SELECT Table2.*
FROM Table1 INNER JOIN Table2
 
Back
Top