Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a table of all duplicates in a dbf file
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00445501
Message ID:
00445502
Views:
20
>I know that I can create a unique.dbf from a dbf file that contains all unique records based on one field or multiple fields.
>
>But how would I create a dbf (using a query) that would give me a table with all duplicated files. For example if a record appeared 3 times I would like to have that in a seperate table with all 3 records. I need this to show my customers how many duplicates they have in their database. This also allows them to determine which record should be used or removed.
>
>Thanks
>
>Peter

Try this:

SELECT * FROM TableName ;
WHERE Name IN (SELECT Name FROM TableName GROUP BY Name HAVING COUNT(*) > ) ;
INTO TABLE Duplicates
Chris McCandless
Red Sky Software
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform