Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2010
    Location
    Hyderabad
    Posts
    12

    Unanswered: Removing Duplicate records

    Hi,

    I have duplicated records (A,A and B,B) and single records (C,D) in a table.

    I want to remove dulicate records so the result looks

    A
    B
    C
    D

    But without using Group by because i need Identity Value (ID of that row) also.

    Please give me any suggesions.

  2. #2
    Join Date
    Dec 2007
    Location
    Richmond, VA
    Posts
    1,328
    Provided Answers: 5
    try a better description of your problem, include the table definition and some sample data as well. At least I can't make out what you are wanting anyway.

    Dave

  3. #3
    Join Date
    Sep 2001
    Location
    Chicago, Illinois, USA
    Posts
    601
    Are the duplicate records identical in every other way, besides the identity key?

    If they are not, you have to give us a rule as to which one to select to delete. In other words, do we delete the one with the lowest identity, or the one with the highest identity, or the one that has a particular values in some other field, etc., etc., etc.
    Ken

    Maverick Software Design

    (847) 864-3600 x2

  4. #4
    Join Date
    Oct 2003
    Posts
    60
    This is easy to do once you figure out which one to keep, either the lowest or highest as ken said.

Posting Permissions

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