Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Eliminate Duplicates
Message
 
À
10/07/2001 03:46:45
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00528501
Message ID:
00528522
Vues:
18
>Hi,
>I've some duplicate rows in one table, i need to remove all duplicate values from the table ... for ex if in a table city i've following data
>
>row code city
>1 1 city1
>2 1 city1
>3 2 city2
>4 3 city3
>5 4 city4
>6 4 city4
>
>so the query should eliminate duplicate for code 1 and 4 ....and 4 rows shud remain.
>Any help plz...I dont know how to write query for this.
>thanx

If you want something like this, "row" becomes meaningless. You can then use the DISTINCT keyword as in:
Select DISTINCT Code, city from Table...
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform