Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Duplicates - Multiple fields
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Duplicates - Multiple fields
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01436141
Message ID:
01436141
Views:
130
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
Next
Reply
Map
View

Click here to load this message in the networking platform