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 |
|
elwoos
Master Smack Fu Yak Hacker
2052 Posts |
Posted - 2004-01-07 : 10:33:26
|
| I have a table of 100,000 patients containing FirstName, LastName, DateOfBirth, PostCode,...What is the most effective way to identify those who are duplicated based on the four fields above being duplicatesmany thankssteveSteve no function beer well without |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-01-07 : 10:38:28
|
| select FirstName, LastName, DateOfBirth, PostCode, count(*)from tblgroup by FirstName, LastName, DateOfBirth, PostCodehaving count(*) > 1==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
elwoos
Master Smack Fu Yak Hacker
2052 Posts |
Posted - 2004-01-09 : 08:16:14
|
| DOH!Thanks.Steve--One day it won't be a stupid day! |
 |
|
|
|
|
|