Quote:
|
I was thinking of Creating a new sybase table and assign my primary/indez keys and then try to import the data from the original tanle into the new one, all duplicated inserts that violate the primary key would then be aborted...?
|
If you only have one non-key value:
Select a.key1, a.key2, ..., a.val
FROM table a
WHERE a.val IN (SELECT TOP 1 val from table b
WHERE a.key1 = b.key1 and a.key2 = b.key2 and...)
Then you realize that it's nigh-impossible to compare rows in SQL and you wind up doing something with cursors.