E
efandango
How can I display duplicate addresses with matching postcodes. At the moment
my SQL will only find duplicate Street Names, which will only be duplicate if
they also have a matching postcode. Because like a lt of big cities, you can
have more than one identical street name, but it is when combined with the
postcode that it becomes unique, but with possible duplicates.
Below is the SQL to find duplicate Street Names, but I need it to match
against the corresponding postcode to find the duplicate addresses.
How can i find the dupes across both fields; [StreetName] - [Postcode] and
then delete just the dupes, leaving the one copy of each record intact?
SELECT [Street Names].StreetName, [Street Names].StreetNameID, [Street
Names].Postcode
FROM [Street Names]
WHERE ((([Street Names].StreetName) In (SELECT [StreetName] FROM [Street
Names] As Tmp GROUP BY [StreetName] HAVING Count(*)>1 )))
ORDER BY [Street Names].StreetName;
my SQL will only find duplicate Street Names, which will only be duplicate if
they also have a matching postcode. Because like a lt of big cities, you can
have more than one identical street name, but it is when combined with the
postcode that it becomes unique, but with possible duplicates.
Below is the SQL to find duplicate Street Names, but I need it to match
against the corresponding postcode to find the duplicate addresses.
How can i find the dupes across both fields; [StreetName] - [Postcode] and
then delete just the dupes, leaving the one copy of each record intact?
SELECT [Street Names].StreetName, [Street Names].StreetNameID, [Street
Names].Postcode
FROM [Street Names]
WHERE ((([Street Names].StreetName) In (SELECT [StreetName] FROM [Street
Names] As Tmp GROUP BY [StreetName] HAVING Count(*)>1 )))
ORDER BY [Street Names].StreetName;