Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to find duplicates 1

Status
Not open for further replies.

NewToThis2

Technical User
Mar 30, 2004
62
US
CR V9
I have a simple employee table in which I need to find duplicate SSN's. I would appreciate suggestions on how to do this. I would like to be able to supress the records that are NOT duplicated. The table fields are employee number, employee name, ssn.

Thanks so much for your expertise!
 
Here is an easy way, but not necessarily the most efficient.

Create a blank report and use the employee table as the datasource.
Insert a Group on SSN and add the employee name and number in the detail section.
Under the Report menu option, choose Selection Formulas, and then Group.
In the editor, enter the following line:

Count({employee.number},{employee.ssn}) > 1

Make sure you update it with your fields.

This will list all your employee records that have more than deuplicate SSN's, and suppress all other records.


~Brian
 
That's a very fast means, Brian, especially if you add to that to select the Database->Perform Grouping on Server and it will be as fast as any as the proper SQL should be generated (only using those 2 fields in the report).

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top