Need help with a "comparison query"...

C

Charles Waters

Hey everyone...

I started using a query that basically creates 2 of the same table,
and returns the results that it seems are duplicate entries. Here's my
dilema...

I thought the way I created it, it would return only records that were
exact duplicates, depending on where I have the comparison field. I
was obviously wrong, because it returns entries that contain duplicate
stuff. So it will return duplicates on anyone that has a "1" in their
employee number, or even a "ch" in their name.

What I am trying to do, is return only exact duplicates. Is there
anyway to do this with the code I have written? Or better yet, is
there any way to do this that isn't that complex!?

CODE:

SELECT DN.DN, DN.DisplayName, DN.TMNum FROM DN, DN AS DN_1
WHERE (((DN.DisplayName) Like "*" & [DN_1].[DisplayName] & "*" And
(DN.DisplayName) Is Not Null) AND ((DN.TMNum)<>[DN_1].[TMNum])) GROUP
BY DN.DN, DN.DisplayName, DN.TMNum;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top