Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Removing duplicate records
Message
De
14/04/1999 09:59:42
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Removing duplicate records
Divers
Thread ID:
00208167
Message ID:
00208167
Vues:
65
Hello:
I'm trying to write a program to remove duplicate records from my
database table. I need to remove the index first, scan for duplicates, delete all and then recall the first record of each duplicate and then add the regular index back. CAn I do this
without having to resetting the relationships up in the database?

THis is my rough code. Any help would be appreciated.

close all
set defa to \wincats\data

use act_plan
delete tag sincase of act_plan


set order to sin
go top
dsin = sin
dadddate = add_date
daddtime = add_time

Scan
locate for sin = dsin, add_date = dadddate, add_time = daddtime
Do while found()
delete
go top
recall
pack
Endscan

ALTER TABLE Act_plan ADD PRIMARY KEY Sin + Caseno TAG Sincase
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform