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 |
|
sql_learner2178
Starting Member
1 Post |
Posted - 2009-07-22 : 03:21:00
|
| I would like to run DELETE query on a database where we have some rules to DELETE the duplicate data.The Database is look like below format:ID FirstName LastName E-mailId Gender Age Marital Status1 a@a.com 2 a@a.com 3 a a@a.com male 4 a aa a@a.com male 23 single5 a aa a@a.com male 22 single6 b bb b@b.com female 30 married7 b b@b.com female married8 b bb b@b.com female married9 b@b.com 10 b@b.com Rules are given below:1. Email id duplicatea) One with no information filledb) Other with no information filled-Delete any one2. Email id duplicatea) One has information filledb) Other has no information filled-Delete (b)3. Email id duplicatea) One has information filledb) Other has same information filled but has more information filled -Delete (a) no |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-07-22 : 03:25:26
|
are you using SQL 2000 or 2005/2008 ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|