Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Duplicates - Multiple fields
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Duplicates - Multiple fields
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01436141
Message ID:
01436141
Vues:
133
Hi Gang!

I want to be able to find records in a table that have more than one field that is duplicate (last_name + first_name). We want to get rid of the duplicate fields (combine them together).

So first, to find them....

Is this code ok? To find all duplicate records on last_name + first_name ?
SELECT last_name, first_name, alt_custno, paquinnumb FROM customer ;
	WHERE last_name + " " + first_name IN ;
		(SELECT last_name + " " + first_name AS cust_name FROM customer ;
			GROUP BY last_name, first_name ;
			HAVING count(last_name + " " + first_name) > 1);
	ORDER BY last_name, first_name INTO CURSOR FINDDUPE
Runs ok, but I want to be sure from others!

Thanks!
Tommy Tillman A+ NetWork+ MCP
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform