I have a database of customers and I want to check for duplicate entries.
I have written a query that looks at duplicates of customer names. This works fine. The problem is that some users are entering new customers and may slightly change the wording of the customer name so that it therefore will not appear in this query.
What I am trying to write is a query which will look at postcodes and will identify if i have more than one customer ID (unique value) associated with a postcode.
I have managed to write a query with three entries:
CustAddPostcode
CompanyName
CustomerID
The criteria for 'CustAddPostcode' is: In (SELECT [CustAddPostcode] FROM [qryCustAddresses] As Tmp GROUP BY [CustAddPostcode] HAVING Count(*)>1 ).
An example of the results are:
EC2N 1RE Customer # 1 23
EC2N 1RE Customer # 1 23
EC2N 1RE Customer # 1 23
C034 4RE Customer # 3 555
C034 4RE Customer # 3 555
C034 4RE Customer # 3 555
C034 4RE Customer # 3 555
MC1 5RE Customer # 44 344
MC1 5RE Customer # 44 344
and so on.
This is not what i want as it will show for each postcode all of the entries, rather than Customer ID's postcodes with more than one different Customer ID.
Can anyone assist with this problem or suggest other options.
I thank you in advance.
Paul
I have written a query that looks at duplicates of customer names. This works fine. The problem is that some users are entering new customers and may slightly change the wording of the customer name so that it therefore will not appear in this query.
What I am trying to write is a query which will look at postcodes and will identify if i have more than one customer ID (unique value) associated with a postcode.
I have managed to write a query with three entries:
CustAddPostcode
CompanyName
CustomerID
The criteria for 'CustAddPostcode' is: In (SELECT [CustAddPostcode] FROM [qryCustAddresses] As Tmp GROUP BY [CustAddPostcode] HAVING Count(*)>1 ).
An example of the results are:
EC2N 1RE Customer # 1 23
EC2N 1RE Customer # 1 23
EC2N 1RE Customer # 1 23
C034 4RE Customer # 3 555
C034 4RE Customer # 3 555
C034 4RE Customer # 3 555
C034 4RE Customer # 3 555
MC1 5RE Customer # 44 344
MC1 5RE Customer # 44 344
and so on.
This is not what i want as it will show for each postcode all of the entries, rather than Customer ID's postcodes with more than one different Customer ID.
Can anyone assist with this problem or suggest other options.
I thank you in advance.
Paul