Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to eliminate duplicate record
Message
 
 
To
09/02/2005 11:02:12
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00985191
Message ID:
00985221
Views:
34
FAQ Eliminating duplicates in a table FAQ #8129 should address your problem in details.

>Hi all,
>
>I used the following codes to get rid of duplicate records, sometimes it works fine and sometimes not.
>
>
>
>
>
>use mytable
>GO top
>
>INDEX ON alltr(field1) TAG field1
>*-- to erase duplicate field
>DO WHILE !EOF()
>	currfield=ALLTR(field1)
>	SKIP
>	IF EOF()
>		EXIT
>	ENDIF
>	nextfield=ALLTR(field1)
>	IF currfield=nextfield
>		SKIP - 1
>		DELE
>		SKIP
>	ENDIF
>ENDDO
>
>DELETE TAG field1
>
>browse
>
>
>
>Any suggestions or new type of coding would be appreciated.
>Tia
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform