Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleteing the last duplicate
Message
De
27/10/2013 19:08:37
Neil Mc Donald
Cencom Systems P/L
The Sun, Australie
 
 
À
27/10/2013 18:04:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01586533
Message ID:
01586540
Vues:
45
Hi,
Try

DELETE FROM YourTable ;
WHERE YourKey NOT IN (SELECT MIN(YourKey) ;
FROM YourTable ;
GROUP BY YourKey, TestField1, TestField2, etc)

Not Tested

>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
Regards N Mc Donald
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform