Question
Delete Duplicate Records in Table
Greetings
I have a table in which several (25%) of 6000 records were entered in error. The address field is identical- some have 4 or more erroneous entries.
The correct records contain a phone number field whereas the duplicates do not.
Could I do something like:
<cfquery name="get_dupes">
SELECT LocationID, address1, Phone
FROM Location
</cfquery>
then:
<cfquery name="delete_dupes"
datasource="someDB">
DELETE FROM Location
WHERE #get_dupes.address1# LIKE Something here ????
AND #get_dupes.Phone# IS ""
</cfquery>
CF 8, Access.
Thanks in advance-
newportri
I have a table in which several (25%) of 6000 records were entered in error. The address field is identical- some have 4 or more erroneous entries.
The correct records contain a phone number field whereas the duplicates do not.
Could I do something like:
<cfquery name="get_dupes">
SELECT LocationID, address1, Phone
FROM Location
</cfquery>
then:
<cfquery name="delete_dupes"
datasource="someDB">
DELETE FROM Location
WHERE #get_dupes.address1# LIKE Something here ????
AND #get_dupes.Phone# IS ""
</cfquery>
CF 8, Access.
Thanks in advance-
newportri
