Re: Need the SQL of a Find Duplicates Query please!

From: lover (no)
Date: 02/10/04


Date: Tue, 10 Feb 2004 14:49:29 -0500

OK sorry for the spam but I think I've got something

SELECT * FROM SomeTable t1 JOIN SomeTable t2 ON
t1.ColumnYouWantToCheckForDupes= t2.ColumnYouWantToCheckForDupes [,
t1.AnotherColumnToCheck = t2.AnotherColumnToCheck, etc...] WHERE
t1.PrimaryKeyOrOtherUID <> tc2.PrimaryKeyOrOtherUID

the only thing I'm not sure how to do is execute this on tables with no
PK/Unique Index...

I think you have to add every other column except the columns you are
checking for duplicates to the WHERE clause.

GL HTH somebody! =)

if anybody has a better form to share, please do! =)

THANKS!

"lover" <no thanks> wrote in message
news:#jTPTvA8DHA.3448@TK2MSFTNGP09.phx.gbl...
> Can somebody please post the SQL up here to find duplicate values in a
> column of a table.
>
> I confess: I always used the wizard for this and I don't know how to
write
> my own! (But i'm not using access right now, so ... no wizard!)
>
> all I need is a simple, generic template to work off of.
>
> help a newbie out?
>
>



Relevant Pages

  • Re: Keith Thompsons messages dont come through
    ... <snip: issues with news propagation> ... different servers and aggregate them in a single local store, ... Resolves true duplicates across servers and ... with some spam but not all. ...
    (comp.lang.c)
  • Re: Keith Thompsons messages dont come through
    ... <snip: issues with news propagation> ... different servers and aggregate them in a single local store, ... Resolves true duplicates across servers and ... with some spam but not all. ...
    (comp.lang.c)
  • Re: [9fans] newbie question
    ... script at the teminal prompt. ... to the directory /sys/lib and execute the newuser ... Do You Yahoo!? ... Mail has the best spam ...
    (comp.os.plan9)
  • Re: Duplicates by Partial Matching (MS ACCESS)
    ... Hey Marshall: ... to execute the code that you have provided? ... "Number" as criteria to look for duplicates, it will not be consider as ... Public Function GetNumAs Integer ...
    (microsoft.public.access.queries)
  • Re: Keith Thompsons messages dont come through
    ... duplicates ... The documentation for xnews implies it can do this (not the spam part ...
    (comp.lang.c)