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

I only want to see duplicate records.

Status
Not open for further replies.

hrg

Programmer
Jan 8, 2009
46
0
0
US
Hi

I want to design a query just to show duplicate records. I have tried using the greater expression in the criteria but I do not thinK this is correct.

I want to show duplicate records using these fields

Title
Initial
Surname
Add1
Add2
Add3
Add4
Add5
Postcode


I tried >"1" but that shows unique records as well, And i tried taking of the speech marks but thewy wont come off.

If anyone can help i would greatly appreciate it.

Thanks
 
Try this...
select
Title,
Initial,
Surname,
Add1,
Add2,
Add3,
Add4,
Add5,
Postcode
from
TableName
group by
Title,
Initial,
Surname,
Add1,
Add2,
Add3,
Add4,
Add5,
Postcode
having
count(*)>1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top