Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I eliminate dup record that has blank child record
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
How do I eliminate dup record that has blank child record
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
Visual FoxPro
Divers
Thread ID:
01001983
Message ID:
01001983
Vues:
60
I am trying to eliminate duplicate records on couple of tables that are linked by relationship. I have a parent table called arcperson and a child table called arcpinfo. both tables are linked by field call personid. In my parent table arcperson I have a couple of fields called lname (last name) and fname (first name). I what to find all duplicates of lastname+firstname and then if any of these name don't have any data in the child table arcpinfo, I want to delete that parent and child record. My problem is how can I find duplicate records on lname and fname and also see if any records or blank records exist in child table. Here is something I tried but didn't workout as far as finding duplicate names:
SET ORDER TO NAMES   && LNAME+FNAME
SELECT lname, fname, count(*) as CntDups FROM arc_person GROUP BY 1 HAVING CntDups > 1 INTO CURSOR test
this gave me an error on grouping.
I'm not sure if I am on the right track. any help appreciated.

thanks
Nick
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform