General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>I have a table with the following fields:
>
>city
>state
>county
>territory
>
>There are several thousand records. I want to get rid of all of the duplicates; Just have one record for each unique record.
>
>Does anyone have an example of code that would go through the table and mark all but one of all duplicate records for deletion?
You might try something like
INDEX ON city+state+county+territory UNIQUE TAG myTag
SET ORDER TO
DELETE ALL
SET ORDER TO myTag
RECALL ALL
DELETE TAT myTag
That seemed to work in my quick and dirty test.
.......Rich
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only