J
jnordhaus
I have a set of data that has dupicate records in it and I want to leave
only one instance of the record and delete all the other records. When I use
the wizard in Access it pull all the records.
How do I write the code to delete the dupicates but leave the first instance
of the record?
Here is my code
SELECT DISTINCTROW First([LMU Data Table].[Job#]) AS [Job# Field],
Count([LMU Data Table].[Job#]) AS NumberOfDups
FROM [LMU Data Table]
GROUP BY [LMU Data Table].[Job#]
HAVING (((Count([LMU Data Table].[Job#]))>1));
only one instance of the record and delete all the other records. When I use
the wizard in Access it pull all the records.
How do I write the code to delete the dupicates but leave the first instance
of the record?
Here is my code
SELECT DISTINCTROW First([LMU Data Table].[Job#]) AS [Job# Field],
Count([LMU Data Table].[Job#]) AS NumberOfDups
FROM [LMU Data Table]
GROUP BY [LMU Data Table].[Job#]
HAVING (((Count([LMU Data Table].[Job#]))>1));