duplication or unmatched

J

JohnE

I have a dillemma that is haunting me and several of my collegues. We have 2
spreadsheets that are imported into A2k so as to run an unmatched query. For
simple reference call then tblA and tblB. They both contain the same fields,
Level, Code, CodeDesc. The dilemma is tblA has approx 30,000 records and
tblB only has approx 20,000. We need to know which records in tblA are not
listed in tblB. We have tried both the duplicate query and unmatched query
but when we run it, there is no information in the query. We have even tried
different variations/combinations. We know that in tblB records were removed
that are in tblA. As it turns out what we are doing now will need to be
repeated about every 2 - 3 weeks.
Does anyone have any thoughts, ideas, suggestions, samples, examples that
might be of help here?
Thanks to anyone responding.
*** John
 
J

Jeff L

What makes each row in your tables unique, ie what is the primary key?
Is it Level and Code? I am assuming. If it is something different,
then you can post that. If it is Level and Code together, your query
would be:

Select TblA.*
From TblA Left Outer Join TblB ON TblA.Level = TblB.Level And TblA.Code
= TblB.Code
Where TblB.Level Is Null
And TblB.Code Is Null

This will give you all Level/Code combinations in tblA that are not in
tblB.

Hope that helps!
 
J

JohnE

Jeff, thanks for the info. Unfortunately it is still coming up blank. One
of the assistants has gone over it and has found a few differences so we know
they exist. We are deciding now whether to send the info back to the
originator and tell them it is junk and to clean it up.
*** John
 

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