Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GET RID OF DUPLICATES
Message
From
28/11/2000 12:53:38
 
 
To
28/11/2000 12:19:21
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00446244
Message ID:
00446289
Views:
8
>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
Map
View

Click here to load this message in the networking platform