Unmatched Query

G

Guest

I created an “Find Unmatched†Query – comparing a table and a query and
everything worked out fine. Then I created another “Find Unmatched†Query
comparing another table and query and it was a mess. The table intially had
1405 records, the query intially had 1348 records – Then I ran
the query and the total number of unmatched was 39,826. I noticed that it
duplicated A LOT of records – Why would this happen?

Thank you
 
P

PC Datasheet

Natalia said:
I created an "Find Unmatched" Query - comparing a table and a query and
everything worked out fine. Then I created another "Find Unmatched" Query
comparing another table and query and it was a mess. The table intially had
1405 records, the query intially had 1348 records - Then I ran
the query and the total number of unmatched was 39,826. I noticed that it
duplicated A LOT of records - Why would this happen?

Thank you
 
J

John Spencer (MVP)

Probably something is wrong with your unmatched query. Can you post the SQL of
your query?

(Possibly unneeded instructions follow)
Open the query
Select View:Sql from the Menu
Select all the text
Copy it
Paste it into the message
 
G

Guest

Thank you for your help - Here you go:

SELECT [Training Grid].SOPNumber, [Training Grid].TrainingType, [Training
Grid].EmployeeName, [Training Grid].DocumentationDate
FROM [Training Grid] LEFT JOIN [SOP Training Information] ON [Training
Grid].DocumentationDate = [SOP Training Information].DocumentationDate
WHERE ((([SOP Training Information].DocumentationDate) Is Null));
 
J

John Spencer (MVP)

Well, I must admit that I do not see any problem with your query.

I'd normally ask you how sure you are that training grid and SOP Training
information have the number of records you reported in your first post, but you
seemed pretty clear about the number of records. My first thought was that you
had somehow left out the join between the tables, but that is obviously not the
case.

SELECT [Training Grid].SOPNumber,
[Training Grid].TrainingType,
[Training Grid].EmployeeName,
[Training Grid].DocumentationDate
FROM [Training Grid] LEFT JOIN [SOP Training Information]
Thank you for your help - Here you go:

SELECT [Training Grid].SOPNumber, [Training Grid].TrainingType, [Training
Grid].EmployeeName, [Training Grid].DocumentationDate
FROM [Training Grid] LEFT JOIN [SOP Training Information] ON [Training
Grid].DocumentationDate = [SOP Training Information].DocumentationDate
WHERE ((([SOP Training Information].DocumentationDate) Is Null));

John Spencer (MVP) said:
Probably something is wrong with your unmatched query. Can you post the SQL of
your query?

(Possibly unneeded instructions follow)
Open the query
Select View:Sql from the Menu
Select all the text
Copy it
Paste it into the message
 

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