Access - fewer records after left join tablea and tableb

I create a left join - from tablea to tableb. I am having a reverse situation than a previous question asked - how can it be that i have fewer records in tablea after the join than before.

tablea has 100 records. i join on tableb on last name and first name, and now tablea indicates 90 records.

The join indicates to have all records in tablea, and only those in tableb that are a match to tablea.

Hope this makes sense.

Thank you
exp vgAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dale FyeCommented:
Post your SQL, I'm sure it has to do with the way you did the join or an associated WHERE clause.
0
exp vgAuthor Commented:
SELECT [TRI 2015].[Last Name], [TRI 2015].[First Name ]
FROM [TRI 2015] LEFT JOIN [TRI MAY PAYOUT] ON ([TRI 2015].[First Name ] = [TRI MAY PAYOUT].[First Name]) AND ([TRI 2015].[Last Name] = [TRI MAY PAYOUT].[Last Name])
GROUP BY [TRI 2015].[Last Name], [TRI 2015].[First Name ];
0
Dale FyeCommented:
The left join looks right, but the Group By clause is the likely cause of the reduced number of records.  Get rid of the Group By clause and see what you end up with.  If that looks like the correct number of records, then you need to run another query to identify the duplicates in your [TRI 2015] table.

But why perform the LEFT JOIN at all if you are not going to display some of the information from [Tri May Payout]?

BTW, the fact that you have a tables named [TRI 2015] and [TRI MAY Payout] indicates that you may have a bigger problem.  Do you have these [TRI YYYY] tables for multiple years or payout tables for each month?  If so, you need to rethink your data design drastically!
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

exp vgAuthor Commented:
Thank you.
0
Dale FyeCommented:
glad to help.

Have you considered my comment about tables with years and month in their names?  This is really bad database design because it requires you to create new tables, forms, queries, and reports as you move forward.  Ideally, you would simply add an extra column (Tri_Year) to your [TRI] table and maybe two ([Tri_Year] and [Tri_Month]) to your [TRI Payout] tables.  This would give you the ability to use the same tables forever by simply filling in the Year and Month columns in those tables.

Failure to do this early in your project will eventually lead to headaches!
0
exp vgAuthor Commented:
Yes - I have considered your suggestion, and am looking into this. How I manage works for now - but  I am all open to suggestions that will help in the future.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.