Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Delete Duplicate records(a different question)

Author  Topic 

Incognito
Starting Member

49 Posts

Posted - 2002-04-02 : 03:02:51
Hello people,

My select statement is as next:

Select Left(Firmanaam,4) as Company, Ltrim(Achternaam) as Surname
From Mailing
Where Achternaam is not null
Order By Ltrim(Achternaam), Firmanaam

Results:

Company - Name
Hart Aaij
Jonk Aalbersberg
Jazo Aaldering
Jazo Aaldering
Jazo Aaldering
Bran Aalders
Bran Aalders
RS T Aalders
Tech Aandenroomer

Now I Want to delete the columns which are exactly the same. In this case it is Jazo - Aaldering, Bran - Aalders. When I delete I want there is ONE left of the duplicates.

If someone can help me out with a nice reference or tips It would be great.

Thnx all,

Incognito

Nazim
A custom title

1408 Posts

Posted - 2002-04-02 : 03:30:25
Graz has written a article on this http://www.sqlteam.com/item.asp?ItemID=3331 .


--------------------------------------------------------------
Go to Top of Page
   

- Advertisement -