Results 1 to 8 of 8

Thread: Finding doubles in Access-table

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2000
    Location
    Vienna, Austria
    Posts
    62

    Wink

    I have a database with about 70000 entries. Lots of them are double and I would like to clean the db from these doubles.
    Now, does someone know how to check for double entries in an Access database and how to remove one of them?
    Life is trip, eat it and smile.

  2. #2
    Junior Member
    Join Date
    Nov 2000
    Location
    Belgium
    Posts
    21

    Smile WIZARD

    In Access, you can use the "Wizard double records" to create a query which will show you the double records. Very easy AND very effective !

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 2000
    Location
    Vienna, Austria
    Posts
    62

    Nope

    I tried this wizard, but he just gave me as a result how many doubles of which record are in the db....
    Life is trip, eat it and smile.

  4. #4
    Fanatic Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    1,008
    Are you after completely duplicated records or duplicated fields?

    Use SQL with a Group By clause and the Count function to identify duplicates.

    Cheers,

    P.
    Not nearly so tired now...

    Haven't been around much so be gentle...

  5. #5

    Thread Starter
    Member
    Join Date
    Nov 2000
    Location
    Vienna, Austria
    Posts
    62

    Question Records

    I am looking for duplicate records and I would like to do it over VB, but if you know an easier way.....post it.
    Thanks
    Life is trip, eat it and smile.

  6. #6
    Fanatic Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    1,008
    Do you know SQL at all?

    the form would be of:
    SELECT (fields), Count(LastField) As DupCount
    FROM Table
    GROUP BY (fields)
    WHERE DupCount > 1

    This would give you duplicate records. I have always done this in code and marked only subsequent duplicated records with a flag and then used that flag in a DELETE SQL query.

    Break it down into small steps.

    OK?

    Paul.
    Not nearly so tired now...

    Haven't been around much so be gentle...

  7. #7
    Junior Member
    Join Date
    Nov 2000
    Location
    Belgium
    Posts
    21

    Wink WIZARD

    The wizard works fine with me !!
    Using the wizard, you have to select the fields used to determine which records are double or not. After finishing the query, Access shows the double records.
    The equivalent SQL of an example I used :
    SELECT DISTINCTROW [lidnr], [naam], [voornaam]
    FROM AlleDeelnemers
    WHERE [lidnr] In (SELECT [lidnr] FROM [AlleDeelnemers] As Tmp GROUP BY [lidnr] HAVING Count(*)>1 )
    ORDER BY [lidnr];

  8. #8

    Thread Starter
    Member
    Join Date
    Nov 2000
    Location
    Vienna, Austria
    Posts
    62

    :-)

    No, I don't know SQL! Still learning.
    But thanks for the post. I will try my best.
    Cheers
    Life is trip, eat it and smile.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width