?
Solved

Finding duplicate records and potential mispellings in an array

Posted on 2011-02-16
5
Medium Priority
?
1,004 Views
Last Modified: 2012-06-21
Hi There

I have an array of of peoples names

Example
string[] names = new string[] {"Jim Bean","Jack Daniels" ,"Jim Bean" ,"Tim Bean"}

How do I loop through the array to find duplicates.
I also need to know how I can find similar names in the array to find mispelt names as in the example.
pseudo-code will be good enough



Thanks
Stanton
0
Comment
Question by:Stanton_Roux
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
5 Comments
 
LVL 12

Expert Comment

by:starlite551
ID: 34910707
Use can use Oracle To Solve this Issue.. There is a Function in Oracle called Soundex() which Finds Names Which Sound Similar.. So It Would be a good option for you to find duplicates in names..
0
 
LVL 12

Accepted Solution

by:
starlite551 earned 2000 total points
ID: 34910738
Also, check out the Difference function in SQL to compare soundexes:

In the first part of this example, the SOUNDEX values of two very similar strings are compared, and DIFFERENCE returns a value of 4. In the second part of this example, the SOUNDEX values for two very different strings are compared, and DIFFERENCE returns a value of 0.

USE pubs
GO
-- Returns a DIFFERENCE value of 4, the least possible difference.
SELECT SOUNDEX('Green'),
  SOUNDEX('Greene'), DIFFERENCE('Green','Greene')
GO
-- Returns a DIFFERENCE value of 0, the highest possible difference.
SELECT SOUNDEX('Blotchet-Halls'),
  SOUNDEX('Greene'), DIFFERENCE('Blotchet-Halls', 'Greene')
GO
0
 
LVL 12

Expert Comment

by:starlite551
ID: 34910748
I think SOUNDEX function is also available in SQL Server.. So try searching for more info about it..
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question