Extract New Items after comparing two different tables.

G

Guest

Hi all,
I would like to create a query or report that contains only those items from
table 2 that do not match items in table 1.

Explanation:
I have two tables with similar information in them. One is an original and
one is new updated table with new products added to it.

I have both tables imported to Access as TableOLD and TableNEW.

TableNEW contains OLDItems + (NewItems) - (deletedItems)
TableOLD contains ALLOLDItems

I want to compare the two tables and extract only those items in TableNEW
that do not match any Items in TableOLD. The result should be a list all new
items items have been added to TableNEW that were not included in TableOLD.
Preferably the list would be a new table called NEWItems

I hope I have explained this right.

Thank you in advance for the help.
 
J

John Spencer (MVP)

There is a query wizard to find unmatched that will do this.

Basically the query is

SELECT TableNew.*
FROM TableNew LEFT JOIN TableOLD
ON TableNew.PrimaryKey = TableOld.PrimaryKey
WHERE TableOld.PrimaryKey is Null

I don't know what your primary key field is (or if it is a multi-field primary
key). You will have to join on the fields that determine each unique record.
 

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

Top