Query Issue - data missing

C

CJOHNSO92

Hi,
working with 2 tables (originally from Excel). One table has 90 rows, the
other 25. Both have last name as a field. I created a query to match the
table of 25 with data in the table of 90. However, I'm only getting a match
on 6 names. I changed the join properties to include 'all records and only
those that match' and results show that for the other records, there is no
matching last name. I checked data types and all are text. I'm sure I'm
missing something simple. Any help is appreciated. Thanks,
Carol
 
K

KARL DEWEY

I'm only getting a match on 6 names.
It did what you ask of it.
If you want a list containing every record then use a union query.
You can union all fields of both tables if they are the same or you can
union just the names and use that query in a left join to the two tables.
 
J

John Spencer

You need exact matches. If one field is "Spencer" and the other is " Spencer"
or "Spencer " (note the leading or trailing space) then you do not have a
match. You can get the trailing space in Excel and then when you import the
trailing spaces can still be there.


John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 
C

CJOHNSO92

That's it! The names were all the same but it was the trailing spaces from
Excel. Thank you!
 

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