T
Terry
I have a table with a lot of duplicate entries. When I
use the Find Duplicates query wizard, the resulting SQL
displayes both occurances of a duplicate record. This of
course doesn't help me when trying to remove the
duplicates. Can someone tell me how to modify the
following SQL string so it only displays one occurance of
the record so I can use it as a delete from statement?
Thanks.
SELECT [Lead_Date], [Phone_Number], [List_Code],
[Country], [Area_Code], [First_Name], [Last_Name],
[Street1], [City], [State], [Zip], [Project], [Agt_Code],
[Agent_Name], [Agent_Phone], [Agent_Fax], [Branch_Code]
FROM [QL Table]
WHERE [Lead_Date] In (SELECT [Lead_Date] FROM [QL Table]
As Tmp GROUP BY [Lead_Date],[Phone_Number] HAVING Count(*)
use the Find Duplicates query wizard, the resulting SQL
displayes both occurances of a duplicate record. This of
course doesn't help me when trying to remove the
duplicates. Can someone tell me how to modify the
following SQL string so it only displays one occurance of
the record so I can use it as a delete from statement?
Thanks.
SELECT [Lead_Date], [Phone_Number], [List_Code],
[Country], [Area_Code], [First_Name], [Last_Name],
[Street1], [City], [State], [Zip], [Project], [Agt_Code],
[Agent_Name], [Agent_Phone], [Agent_Fax], [Branch_Code]
FROM [QL Table]
WHERE [Lead_Date] In (SELECT [Lead_Date] FROM [QL Table]
As Tmp GROUP BY [Lead_Date],[Phone_Number] HAVING Count(*)
ORDER BY [Lead_Date], [Phone_Number];1 And [Phone_Number] = [QL Table].[Phone_Number])