Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delete identical records
Message
 
 
To
13/06/2001 15:21:01
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00519018
Message ID:
00519025
Views:
16
This message has been marked as the solution to the initial question of the thread.
>I want to delete all the records in a table that have the same manifest number but keep the one record of it in the table. How would I do this?
>
>Tyler
Select Mytable
Set Order To ManifestNum
lcManifestNum = Null
SCAN
    IF lcManifestNum = Mytable.ManifestNum
        Delete
    ELSE
        lcManifestNum = Mytable.ManifestNum
    ENDIF
ENDSCAN
This code assumes that you have index on manifest number and you want to keep the first of the dup records.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform