Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Network:
Windows 2008 Server
>>>Hi All:
>>>
>>>What's the easiest and most elegant way to remove the SECOND duplicate. IOW, when there is a dupe, get rid of the second record.
>>>
>>>Thanks,
>>>
>>>Yossi
>>
>>Why do you want to get rid of the second? If there is a difference between the first and the second than they are not duplicates.
>>
>>Better specify what makes a record 'duplicate' to answer your question.
>>
>>Koen
>
>The key is the same, but the data in the other fields ijn the 2nd record is corrupt.
Hi,
in that case do you have a significant value in a record should not have to qualify it as corrupt?
The approach as by Neil here, does not garantee it will delete the 2nd record. More over what qualifies a record as '2nd record'?
Dont you have a unique ID field in this table? If not I strongly advise you to change your table structure and introduce imm a unique ID field.
Regrds,
Koen
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement