Re: Duplicate Records From a Table
- From: R Layedra <R Layedra@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 2 Jun 2005 17:21:01 -0700
Hi John,
You're right on the money with what I want.
But, I still cannot come up with my desired result. I have created another
field where I have trimmed the APP_KEY to nine digits and that seems to work
but it's definately not what I wanted. Why is this simple (or so, it seems)
procedure so difficult to create?
Thanks for the help,
Rodolfo
"John Spencer (MVP)" wrote:
> Close, but not quite. The user wanted to return the entire App_key (and
> possibly other fields as well).
>
> SELECT *
> FROM WhatTable
> WHERE Left([APP_KEY],9)
> IN (SELECT Left([APP_KEY],9)
> FROM WhatTable
> GROUP BY Left([APP_KEY],9)
> HAVING Count(Left([APP_KEY],9))>1)
>
> Ofer wrote:
> >
> > 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
> >
> > "R Layedra" wrote:
> >
> > > 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 digits. 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.
> > >
> > >
>
.
- Follow-Ups:
- Re: Duplicate Records From a Table
- From: Chaim
- Re: Duplicate Records From a Table
- References:
- Duplicate Records From a Table
- From: R Layedra
- RE: Duplicate Records From a Table
- From: Ofer
- Re: Duplicate Records From a Table
- From: John Spencer (MVP)
- Duplicate Records From a Table
- Prev by Date: Re: table not found error, but it does exist.
- Next by Date: Update query
- Previous by thread: Re: Duplicate Records From a Table
- Next by thread: Re: Duplicate Records From a Table
- Index(es):
Relevant Pages
|