By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,489 Members | 1,777 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,489 IT Pros & Developers. It's quick & easy.

find duplicates query

trueadvantage
P: 12
CAN U HELP ME?

Hi... I have 1 little but critical (for me) problem regarding access query.

Problem Details: -

I have one table which includes Employee Name and Employee ID

Table:-

EmpName EmpID
A 11
B 12
C 11
D 13
E 12
F 14
G 14
H 15
I 16

If you look at above table, u will come to know that some employee has got same emp numbers.

I want to build a query which will help me to find out those emp names who got same empid.

if anybody understand my problem so please send me query.

Thnnx in advance
Feb 8 '08 #1
Share this Question
Share on Google+
2 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
I have split this post out into its own thead as it was hijacking the thread it was on.

Have you tried creating a Find Duplicates query?

If you try to find duplicate empID and include the empname field. It should give you the results you want.
Feb 8 '08 #2

aas4mis
P: 97
CAN U HELP ME?

Hi... I have 1 little but critical (for me) problem regarding access query.

Problem Details: -

I have one table which includes Employee Name and Employee ID

Table:-

EmpName EmpID
A 11
B 12
C 11
D 13
E 12
F 14
G 14
H 15
I 16

If you look at above table, u will come to know that some employee has got same emp numbers.

I want to build a query which will help me to find out those emp names who got same empid.

if anybody understand my problem so please send me query.

Thnnx in advance
Try this:

Expand|Select|Wrap|Line Numbers
  1. SELECT EmpName, count(EmpID)
  2. FROM tblMyTable
  3. GROUP BY EmpName
  4. HAVING count(EmpID) > 1;
I'm still new to access myself but I believe this is what you're looking for.
Feb 8 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.