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.
Author |
Topic |
Humanski
Starting Member
1 Post |
Posted - 2002-09-06 : 09:17:36
|
I have a problem I have to delete some duplicates out of my table. e.gID ADD1 ADD2 Date 10 More More 19/12/8010 More More 21/12/80As you can see the fields are identical except for the date how would I write the SQL to get rid of one of these records, I know I have 7000 records in the database that are duplicates I would like to reduce this to 3500 record. |
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2002-09-06 : 09:27:28
|
You want to use a DELETE statement with a NOT EXISTS (<correlated sub-query>) in your where clause....Jay White{0} |
 |
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
Posted - 2002-09-06 : 12:17:39
|
And in our FAQ at [url]http://www.sqlteam.com/FAQ.asp[/url] you'll find a link to this article [url]http://www.sqlteam.com/item.asp?ItemID=3331[/url] on eliminating duplicates. |
 |
|
|
|
|