Re: Duplicate Records From a Table



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.
> > >
> > >
>
.



Relevant Pages

  • Re: Maketable query a text field is changing to expoential number?
    ... If you do want decimal places, you can use the currency data type -- this will give you 15 digits before the decimal and 4 digits after ... It is not a good idea to use single or double precision numbers to link fields or for exact comparisons, because of the way they are stored ... I then have a make table query to make tables needed to view the results in reports based on product lines. ... Also for some of the items it is changing it is duplicating, but if I run a find duplicates query is shows nothing, implying there are no duplicates. ...
    (microsoft.public.access.queries)
  • Re: Duplicate Records From a Table
    ... >> I'm trying to find duplicates within a table where a field name called ... >> APP_KEY is made up of 12 digits. ... I want the query to ONLY find ... Prev by Date: ...
    (microsoft.public.access.queries)
  • RE: Duplicate Records From a Table
    ... "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. ... I want the query to ONLY find ...
    (microsoft.public.access.queries)
  • Duplicate Records From a Table
    ... I'm trying to find duplicates within a table where a field name called ... APP_KEY is made up of 12 digits. ... I want the query to show me all FIVE records because they are all alike ... Prev by Date: ...
    (microsoft.public.access.queries)
  • Re: Why not FP for Money?
    ... > terms of significant digits would be fine with me. ... In Brazil, there is tax for money transfers (all transfers to, from ... But when you sum up all the transfers, ...
    (comp.lang.python)