Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Query For Duplicate Records
Message
From
27/09/2006 11:37:50
 
 
To
27/09/2006 11:24:35
Stan Vaninger
Mitek Industries, Inc
Missouri, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 2000 SP4
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01157520
Message ID:
01157530
Views:
20
>I have two tables in a mother-daughter relationship. I want to scan through the mother table looking for duplicate records (just need to compare one field) in the daughter table. Is there a slick way to do this?
>
>Thanks very much,
>Stan

Not tested, but something like this should work.
SELECT FKeyToMother, FieldToCheck, COUNT(*) AS Dupes ;
  FROM Daughter ;
 GROUP BY FKeyToMother, FieldToCheck ;
 HAVING Dupes > 1 ;
  INTO CURSOR Dupes
Regards,
Jim
Previous
Reply
Map
View

Click here to load this message in the networking platform