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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-08-12 : 23:55:30
|
Srikanth writes "Hi ,I have a database file in which I have some duplicate records which I want to get rid of. Here is an example of a file which has following recordsID Name Date Salary Loan--------------------------------------------100 Joe 10/12/97 ---- -- 101 Josh 02/13/73 ---- --100 Joe 10/12/97 ---- -- 102 Job 07/18/86 ---- --100 Joe 05/08/76 ---- --etc... So this has one record duplicating as(for only ID,Name,Date)100 Joe 10/12/97 100 Joe 10/12/97 If I use select distinct Id,Name,Date from table1... I get my result but I need the other fields too in my resultset.So I want to get rid of only one record (either of them) using a single SQL Query.Can you please help me out in writing an SQL query for this...I apppreciate u'r help in advance.Thanks..." |
|
|
|
|
|