Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Oct 2002
    Location
    Sayre, Pennsylvania, USA
    Posts
    504
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Deleting Duplicates (2000)

    Hi,
    I used the Find Duplicates query to find my duplicates, but when I try to delete the dups from that query, it says their read-only. Once I find my dups, what's an easy way I can delete them all. There about 500.
    Thanks,
    Deb

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, Br. Columbia, Canada
    Posts
    632
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Deleting Duplicates (2000)

    On occasion, I have modified something like the FindDuplicates query to create a new table with the keyfields of the duplicate entries. The important point here is that it actually creates a new (temporary) table. Then create a new query that deletes the selected records from the original query. Something like

    DELETE * from tblOriginal where keyfield in (SELECT keyfield FROM tmpNewlyCreatedTable)

    The important point here is the "... IN..." syntax which selects only the records whose keyfield is already in the temporary table. Obviously you must control the contents of the temporary table so that it leaves the first record of any duplicate pair and selects ONLY the duplicate records. The nice thing about making the temporary table is that you can genuinely see which records will be affected.

    Hope this helps.
    --------------------------------------------------
    Jack MacDonald
    Vancouver, Canada

  3. #3
    4 Star Lounger
    Join Date
    Oct 2002
    Location
    Sayre, Pennsylvania, USA
    Posts
    504
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Deleting Duplicates (2000)

    Thanks, I'll give that a try, but it just seems like too much work. They give you a query to find your dups but not a fairly easy way to delete them? geesh.

    Thanks,
    Deb

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Deleting Duplicates (2000)

    Did you build the find duplicates query against a table or against a query? If you built it on a table, the query should allow you to delete records, although you wouldn't want to delete all of them, of course. Why don't you post the SQL of the find duplicates query. Then someone may be able to tell you why it is read-only.
    Charlotte

  5. #5
    4 Star Lounger
    Join Date
    Oct 2002
    Location
    Sayre, Pennsylvania, USA
    Posts
    504
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Deleting Duplicates (2000)

    I built it against a query so that's why it's read only. Thanks.

    Deb

Posting Permissions

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