Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Duplicate deleter
Message
From
12/04/2011 13:38:48
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Duplicate deleter
Miscellaneous
Thread ID:
01507056
Message ID:
01507056
Views:
119
Here is a bit of code I cobbled up to delete duplicates.
Help yourself or correct my errors if there are any
SELECT [Your table name here]
COUNT TO EndOfTheFile
? EndOfTheFile
? " Searching for duplicate records"
FOR Outside = 1 TO EndOfTheFile
	GOTO Outside
	GoodRecord = ALLTRIM(Field name here)
	FOR Inside = (Outside + 1) TO EndOfTheFile
		GOTO Inside
		CheckedRecord = ALLTRIM(Field name here)
		IF CheckedRecord = GoodRecord
			DELETE
		ELSE
			DUMMY = DUMMY + 1
		ENDIF
	NEXT Inside
NEXT Outside
* BROWSE
* PACK
CLOSE TABLES
I ain't skeert of nuttin eh?
Yikes! What was that?
Next
Reply
Map
View

Click here to load this message in the networking platform