Re: Comparing for Duplicate rows

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: John Nurick (j.mapSoN.nurick_at_dial.pipex.com)
Date: 05/19/04

  • Next message: John Nurick: "Re: Copy Data"
    Date: Wed, 19 May 2004 08:18:29 +0100
    
    

    Hi Sue,

    If you just want to retrieve single rows from tables that have
    duplicates, use constructions like

            SELECT DISTINCT
    and
            SELECT TOP 1

    To identify duplicate rows, use the Find Duplicates query wizard, which
    lets you specify which columns to compare. If necessary you can edit the
    SQL produced by the wizard to fine-tune it.

    To compare tables, you can create a query that joins them on the
    relevant fields (to see what records they have in common); use the Find
    Unmatched query wizard; or various other kinds of queries.

    There's a very good book on using SQL to extract and compare data. From
    memory, the authors are Hernandez and Viescas and the title is something
    like SQL for Mere Mortals (my copy's in the office and I'm at home).

    On Thu, 13 May 2004 10:17:31 -0700, "rsue"
    <anonymous@discussions.microsoft.com> wrote:

    >My "imported or linked" database has duplicate rows. The
    >(columns) fields I need to extract only need one row for
    >each entry in the invoice field. Please tell me where to
    >find out (a) how to compare one table to another, and if
    >possible how to auto highlite (or select) which columns
    >are different information (90 columns).
    >(b) know if there is a module or selection in program to
    >remove all but one row in a field that has dups.
    >Thanks for your help. I'm willing to buy a book, etc.
    >anything that will help me understand comparisons. I did
    >not create the imported db.
    >sue

    --
    John Nurick [Microsoft Access MVP]
    Please respond in the newgroup and not by email.
    

  • Next message: John Nurick: "Re: Copy Data"

    Relevant Pages

    • Re: Switching from Corel Paradox to Access 2010
      ... Our current database system uses a central customer database, ... I mean that the script would compare the customer info fields ... clusters which are compared with other clusters to eliminate duplicates. ... ' Build a sort string to make sure duplicate records are ...
      (microsoft.public.access.modulesdaovba)
    • Re: Down to serious business -- possible fugitive from vb6
      ... reasonably competent at vb6, ... compare two directories and eliminate duplicates), then code it up with the free / demo versions of various compilers. ...
      (borland.public.delphi.non-technical)
    • Re: Duplicate file checker in C#?
      ... locate anything on CodeProject or SourceForge. ... Do you want to compare the content of two files, or do you want to see if a file ... MD5 or sorting by size and doing a byte-by-byte compare (BTW, ... then finding out if they are duplicates. ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: Identify duplicates and move to new sheet
      ... it would start with a, and compare a to every element that followed (b, ... Column A only and then check colum B for duplicates separate from A. ... Dim rng As Range, cell As Range ...
      (microsoft.public.excel.programming)
    • Re: primary key
      ... The field that I'm using is an auto number ... I'll run the Query Wizard as you suggest. ... - an Append query can write data into an Autonumber field; ... it's perfectly possible to insert duplicates. ...
      (microsoft.public.access.forms)