Compare tables

  • Thread starter Thread starter Steve B
  • Start date Start date
S

Steve B

I import data into a table daily with a list of parts we
are receiving that day. Then as the parts are unpacked and
sorted we scan the barcode into a separate table that
includes the part number. I would like to compare the two
tables to ensure that all the parts were received. Both
tables have the part # field and after all the parts have
been unpacked and sorted the new table should be equal to
the original table. Anyone help with this.

Thanks
Steve B
 
What you probably want are three queries to compare your
two tables (tblImported and tblScanned).

1> qryMatched
Join the two tables on the PartNo field with an Inner Join
(where the values are match in both tables)

2> qryExpectedNotReceived
Join the two tables on the PartNo field with an Outer Join
(all records in tblImported and only matching records in
tblScanned), where tblScanned.PartNo Is Null (not received)

3> qryReceivedNotExpected
Join the two tables on the PartNo field with an Outer Join
(all records in tblScanned and only matching records in
tblImported), where tblImported.PartNo Is Null (not
received)

Hope this helps!

Howard Brody
 
Back
Top