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 - 2004-06-07 : 07:31:27
|
| newuser1960 writes "Hi,I am trying to find rows in my SQL Server table where important details on duplicate records do not match each other (i.e MemberID is not Unique in this table as there could be several enries for one member, but for each of these duplicate, the FirstName and Surname should be the same).So, If MemberID = 123and Surname = SMITHThen all other rows with MemberID 123 should have Surname SMITH.Can you please help with this query. This table in populated manually and I need to find typo errors.Thank you" |
|
|
Amethystium
Aged Yak Warrior
701 Posts |
Posted - 2004-06-07 : 07:45:27
|
| [code]select a.MemberID, a.Surname, b.Surnamefrom yourTable a, yourTable bwhere a.MemberID = b.MemberIDand a.Surname <> b.Surname[/code] |
 |
|
|
|
|
|