Solved

Find Records in Access with a query

Posted on 2013-06-26
4
360 Views
Last Modified: 2013-06-27
I created a new table with a query by Joining two tables and took some of the fields from one table and some from the other, but I know that not all the data matched by the joined filed so I did it so all the records from the first table were are created and only the ones from the second table. the main table has 10000 records and the joining table has 340 records. I expect the new table only to have 10,000 records however the new table has 34 more records.

I like assistance to find out what I am doing wrong and how do I find the extra 34 records on the new table???
0
Comment
Question by:TonyEF
4 Comments
 
LVL 48

Expert Comment

by:PortletPaul
ID: 39280223
>>so I did it so all the records from the first table were are created
how?
>>and only the ones from the second table
what does this mean?

please post all of the sql you used.
are you prepared to re-create this new table if needed?
when you copied to the new table did you include a unique ID from the first table?
0
 
LVL 40

Accepted Solution

by:
als315 earned 500 total points
ID: 39280289
You can have more records if in second table you have duplicate records.
For example:
First table:
ID
1
Second Table:
ID(FK)      SomeField
1            5
1            7

Your query with left join by ID and ID(FK) will give you 2 records.
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 39280806
What is probably happening is that you have duplicates in the second table which match the join field in the first table.

Check the 2nd table for duplicates, remove the duplicates, and your query should then return the 10,000 records you expect.
0
 

Author Closing Comment

by:TonyEF
ID: 39282572
thank you...
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question