Duplicate Records of a Table

G

Guest

I'm trying to find duplicates within a table where a field name called
APP_KEY is made up of 12 digits. However, I want the query to ONLY find
duplicates based on the first 9 digits: For example,
APP_KEY:
123456789001
123456789002
123456789003
123456789003
123456789003

I want the query to show me all FIVE records because they are all alike
within the first nine records. I don't want just the last three!

Can anybody please help me? I've tried everything I can think of but my
access expertise is very limited.
 
G

Guest

use the left([APP_KEY),9) or Right([APP_KEY),9) either in criteria or in the

fieldname: right([APP_KEY]),9) for example.

see help file,
good luck,

sam
 
G

Guest

Try this query
SELECT Left([APP_KEY],9) AS Expr1
FROM MyTable
GROUP BY Left([APP_KEY],9)
HAVING Count(Left([APP_KEY],9))>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

Top