Duplicates in my Query

Tansar

Registered User.
Local time
Today, 18:04
Joined
Dec 28, 2000
Messages
55
Hi
for some reason I am getting duplicates in my query :confused:

What I have is Park Road. There are 3 Park Road' but in different Wards.

The table has only 1 input of the word Park Road for ONE of the areas, yet all 3 areas show, like:

STREET WARD
Park Road DRO
Park Road STA
Park Road AUD

The table only has Park Road DRO. So Im kind a confused as to why are the other 2 showing :o ...any help appreciated.
Thanks
 
Add the ward to your query. Set it to where, and the criteria to DRO. Group by on the other fields, and you can make the ward not show in the results if you want.
 
Add the ward to your query. Set it to where, and the criteria to DRO. Group by on the other fields, and you can make the ward not show in the results if you want.
Thanks for the reply.

Ward is already in...:)

Here's the SQL view of the query:

SELECT tblRequests.Streets, tblStreets.Ward
FROM tblStreets INNER JOIN tblRequests ON tblStreets.Street = tblRequests.Streets;

:confused:

Why are the other same named streets in other wards showing?

I have 11 streets filled in my main table. The query is showing 15 lol
 
Last edited:
What table are you referring to? It may just be a matter of changing it to a left/right join depending on your relationships.
 
quote - last bit of your query
tblStreets.Street = tblRequests.Streets;

you are saying "show me the items where the street names are the same"

what you are getting is a cross-product

you have a street name, but there are 3 matching street names in the address table, so access retrieves all of them. Note, that this is normal correct access behaviour - its just not what oyu expected/wanted. You need to get round this by including the WARD in the relationship as well - but this may not be possible, because you may find that your data is not properly normalised - ie, you didnt anticipate problems that would be caused by duplicate street names - so you may need some database redesign
 

Users who are viewing this thread

Back
Top Bottom