Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete identical records
Message
 
 
À
13/06/2001 15:21:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00519018
Message ID:
00519025
Vues:
17
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--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform