Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Find Records in Access with a query

Posted on 2013-06-26
4
Medium Priority
?
364 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 49

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 2000 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 48

Expert Comment

by:Dale Fye
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Cancel future meetings from user mailboxes in Office 365 using Remove-CalendarEvents
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

730 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