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)
 Deleting Suplicate Records without using Extra Tables or Stored Procedures.

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-02-05 : 09:09:51
Fortunate Guy writes "I have a table having no PRIMARY KEY and it has duplicate records having the same values for all the fields. I want to delete all the duplicates leaving behind just a single record of those duplicates. I don't want to use an extra table or a stored procedure. Can it be done in a Single SQL Query ?

Thanx in Advance."

Nazim
A custom title

1408 Posts

Posted - 2002-02-05 : 09:50:13
WHY NOT a STORED PROCEDURE!!!!!!(Am I on right path Rob ? )

you can use Distinct clause to do it.


Check this Article by Graz on Deleting duplicate records too
http://www.sqlteam.com/item.asp?ItemID=3331


HTH

--------------------------------------------------------------
Dont Tell God how big your Problem is , Tell the Problem how Big your God is

Edited by - Nazim on 02/05/2002 09:55:17

Edited by - Nazim on 02/05/2002 09:57:13
Go to Top of Page

andre
Constraint Violating Yak Guru

259 Posts

Posted - 2002-02-05 : 10:28:40
quote:
WHY NOT a STORED PROCEDURE!!!!!!


That's what I'd like to know too.

Go to Top of Page
   

- Advertisement -