Results 1 to 2 of 2

Thread: query

  1. #1
    Rob Guest

    query

    Can any one write a singe query to delete all duplicate entries from a
    table?
    Thanks
    Rob

  2. #2
    Darrell Christensen Guest

    query (reply)

    Hi Rob,

    This example would delete all records where the ID > 1, be careful with this type of update, you may not be too happy if you delete the records that you really want to keep.

    DELETE DISTINCTROW colume1
    FROM table
    WHERE (((table.colume1) In (SELECT [colume1] FROM [table] As Tmp GROUP BY [colume1] HAVING Count(*)>1 )));

    Hope this helps.

    Darrell

    On 2/9/99 4:23:11 PM, Rob wrote:
    > Can any one write a singe query to delete all duplicate entries from
    > a
    table?
    Thanks
    Rob

Posting Permissions

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