Deleting duplicate records

Ask a Question related to FileMaker, Design and Development.

  1. #1

    Default Re: Deleting Duplicate records

    Jon,

    You didnt supply the DDL, so I can only point to existing practices to
    remove duplicate records.Here they are:

    INF: How to Remove Duplicate Rows From a Table
    [url]http://support.microsoft.com/default.aspx?scid=kb;EN-US;q139444[/url]

    INF: Removing Duplicate Rows from an Existing Table in SQL
    [url]http://support.microsoft.com/default.aspx?scid=kb;EN-US;q70956[/url]

    Removing Duplicate Records
    [url]http://www.databasejournal.com/features/mssql/article.php/1438651[/url]

    >>>> Should I use primary keys to prevent this?
    Yes or a UNIQUE constraint depending upon the business logic.

    >>>Would the job fail or just not load the dups?
    May be you can load it first to a temp table and then use the logic
    mentioned in the above articles before inserting to the main table.


    --
    Dinesh.
    SQL Server FAQ at
    [url]http://www.tkdinesh.com[/url]

    "Jon" <jonscott@smartneighborood.net> wrote in message
    news:055701c34660$d76633f0$a301280a@phx.gbl...
    >
    > Hi,
    >
    > I have duplicate records in a table that need to be
    > removed. Any coding help to remove these records would be
    > appreciated. Also ideas on preventing would be helpful.
    > Should I use primary keys to prevent this? Sorry new to
    > SQL coding. Also if setting keys would prevent this what
    > would happen when I BCP data into the table and the file
    > contained dups? Would the job fail or just not load the dups?
    >
    > Thanks,
    >
    > Jon

    Dinesh.T.K Guest

  2. Similar Questions and Discussions

    1. Deleting duplicate entries from database table
      NOTE: The same message is also posted at comp.lang.php, mailing.database.mysql, mysql on July 7. The scenario is as: 1. A table is created 2....
    2. Duplicate records
      Hi I don't know if this is the best way to query for duplicate records but this works. If someone has a better idea to do this please feel free to...
    3. Return Records and not duplicate them :: Again
      I will finish the post this time... I need help on the following situation. I have a solution in ASP/VB Script where I query a RecordSet for...
    4. Duplicate records?
      Hi Shai Use field validation to ensure that entries are unique, with a custom message to tell the user what to do if they aren't. Bridget Eley...
    5. SQL Query for deleting duplicate records
      Dear All, Does anyone know the SQL query for deleting duplicated record from a table? Eg: There are 10 fields, out of that if two fields (say...
  3. #2

    Default Deleting duplicate records

    The help file is a bit thin in its description of how to locate and delete
    "excess" duplicate records.

    Locating duplicate records is straight forward (!), but how does one go
    about finding duplicate records in excess of the first instance of a record?
    Once found, I assume a simple delete all records is appropriate, assuming
    that only duplicate records are displayed.

    Any help or pointers would be appreciated.

    Thanks - Art

    Art Russell Guest

  4. #3

    Default Re: Deleting duplicate records

    Actually, the online help is very helpful in this respect. Read the article
    "Finding duplicate values using a self-join relationship" (a search on
    "duplicate records" will find it). It will explain precisely what you need
    to do to achieve your goal.

    Bridget Eley

    in article BB5EF188.52A21%artrussell@mindspring.com, Art Russell at
    [email]artrussell@mindspring.com[/email] wrote on 13/8/03 9:33 AM:
    > The help file is a bit thin in its description of how to locate and delete
    > "excess" duplicate records.
    >
    > Locating duplicate records is straight forward (!), but how does one go
    > about finding duplicate records in excess of the first instance of a record?
    > Once found, I assume a simple delete all records is appropriate, assuming
    > that only duplicate records are displayed.
    >
    > Any help or pointers would be appreciated.
    >
    > Thanks - Art
    >
    Bridget Eley Guest

  5. #4

    Default Re: Deleting duplicate records

    Art Russell wrote:
    > The help file is a bit thin in its description of how to locate and delete
    > "excess" duplicate records.
    >
    > Locating duplicate records is straight forward (!), but how does one go
    > about finding duplicate records in excess of the first instance of a record?
    > Once found, I assume a simple delete all records is appropriate, assuming
    > that only duplicate records are displayed.
    >
    > Any help or pointers would be appreciated.
    >
    > Thanks - Art
    >
    In FileMaker ver 5 and above from the Users Guide, chapter 10, section
    13, titled Example of a Scriptmaker Script. In ver 4 it is chapter 5,
    section 26. This walks you through setting up and scripting a method of
    finding all duplicates. Also if you search for "finding duplicates" in
    the knowledgebase at filemaker.com you will find two more techniques.
    This should help. Best of luck.

    Michael Myett

    Michael Myett Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139