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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

filtering duplicate records

Status
Not open for further replies.

Ryker7

MIS
Jun 19, 2003
44
US
I have a database that has employee records. In some instances, there are duplicate records in the database that are an integral part. I want a report to list the employee records but not the duplicates. How do I construct the query to only print the duplicate records once?
 
If the duplicate records are completely duplicate in all fields you can create a SELECT query with all fields being selected. Then use the Totals button to Group By on all fields. This will group all of the duplicated records into one record. The single records will remain as one.

EXAMPLE:
Code:
Select A.Field1, A.Field2, A.Field3, A.Field4 
FROM Table1 as A 
GROUP BY A.Field1, A.Field2, A.Field3, A.Field4;

Response back if you have any questions.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top