Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Eliminate Duplicates
Message
 
To
10/07/2001 03:46:45
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
00528501
Message ID:
00528522
Views:
17
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform