Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Updating records in FoxPro tables
Message
 
 
To
05/10/2001 16:50:58
Leshel Rich
Plains Cotton Coop Assoc
Lubbock, Texas, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00565010
Message ID:
00565071
Views:
25
>I have some dupe records that are causing me problems and I need to delete one of the dupes for each record in several tables. Is there a way to do that without deleting each individual record by hand? Is there a way to do it using the command line?
select KeyID, count(*) as CntDups from yourtable group by KeyID ;
       having CntDups > 1 ;
       into cursor curDupes
index on KeyID tag KeyID
select yourtable
set relation to KeyID into curDupes
delete for found('curDupes') && One of the dupes would be deleted
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform