finding duplicates can't create key field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I imported a list of building telephone jacks and attributes. There seems to
be a duplicate jack somewhere which keeps me from turning this field into a
key field.

Is there an easy way to find the duplicates?
 
Try this SQL in a query to check for duplicates in specific field

SELECT TableName.FieldName, Count(TableName.FieldName) AS CountOfFieldName
FROM TableName
GROUP BY TableName.FieldName
HAVING Count(TableName.FieldName)>1
 
SELECT jacks, count(jacks)
FROM YourTable
GROUP BY jacks
HAVING count(jacks) > 1;
 
This worked good but Access turned it into this:

SELECT Jack.Jack AS Expr1, Count(Jack.Jack) AS Expr2
FROM Jack
GROUP BY Jack.Jack
HAVING (((Count(Jack.Jack))>1));

How do I stick another field ( [Bld Num].Jack ) in here? Everything I've
tried has failed.
 
SELECT Jack.Jack AS Jacks, Jack.[Bld Num] as BldNum,
Count(Jack.Jack) AS JackCount
FROM Jack
GROUP BY Jack.Jack, Jack.[Bld Num]
HAVING (((Count(Jack.Jack))>1));

Try this.
--
Jerry Whittle
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


EdLeeYoung said:
This worked good but Access turned it into this:

SELECT Jack.Jack AS Expr1, Count(Jack.Jack) AS Expr2
FROM Jack
GROUP BY Jack.Jack
HAVING (((Count(Jack.Jack))>1));

How do I stick another field ( [Bld Num].Jack ) in here? Everything I've
tried has failed.

Jerry Whittle said:
SELECT jacks, count(jacks)
FROM YourTable
GROUP BY jacks
HAVING count(jacks) > 1;
 

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

Back
Top