• Clue: Anyone who begins by thinking "SQL Server doesn't have what Oracle has" is going to arrive at a solution that fails to make best use of SQL Server.  Simply add a column of datatype int and set the identity property to "Yes (not for replication)" and all the existing rows in the table will be given a row identifier.

    >>>

    create table test (name varchar(10))

    insert into test values ('Kate')

    insert into test values ('Kate')

    insert into test values ('Sue')

    -- Enterprise Manager is the easiest way to add a column, so add column ID using EM.  Datatype is int and property

    create view testUniqueID as select name, min(Id) as minID

    from test

    group by name

    delete test

    from testuniqueID join test

    on testuniqueID.name=test.name

    where testuniqueID.minID < test.id

    drop table test

    drop view testUniqueID

    >>>

    Lesson: SQL Server does have a row identifier.  It stays out of the way unless you need it.  Anything Oracle does, SQL Server does more elegantly.

    _________________
    "Look, those sheep have been shorn."
    data analyst replies, "On the sides that we can see.."