Solved

Smart first name matching in TSQL

Posted on 2013-06-18
9
360 Views
Last Modified: 2013-06-19
Hello experts,

We are looking for script (actually for data) for smart first name conversion.
I.e. if user enter William or Billy then script should return Bill, if user enter Alexander, Aleks, Sasha then script should return Alex, etc.
Actually I can write SQL to do it, but I can't find list of all possible first names.
Is anybody have it?

Much thanks, Alex.
0
Comment
Question by:partners1998
[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
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 25

Accepted Solution

by:
Lee Savidge earned 500 total points
ID: 39255683
There isn't a list of all possible first names so this is not a task that is ultimately possible to complete.

For example, if I decide to call one of my offspring "hubcap" you'd stand no chance of knowing that I might call them "hub" or "capper" for short. There are no official shortenings of names. For example Bob is short for Robert but it isn't part of any official rules or list of official names because anyone can call their children whatever they like.

The UK's rules on baby names are among the most liberal in the world. The General Register Office says there are no restrictions on parents - except for exceptional cases, such as a name which could be deemed offensive, when an official could refuse to register it.

How are you expecting to handle names from outside the UK or unusual names like Moonunit?
0
 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 39255749
You need to use FullText.  It supports synonyms.  Please read the following article (credit to op):

https://www.simple-talk.com/sql/learn-sql-server/understanding-full-text-indexing-in-sql-server/
0
 
LVL 25

Expert Comment

by:Lee Savidge
ID: 39255775
That assumes you have a list of all names.

Does FullText know that Richy could be short for Richard whereas Richie may not be?
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 39255830
Does FullText know that Richy could be short for Richard whereas Richie may not be?
No you'd have to configure it.  But Full Text is the way you can implement this under SQL Server.
0
 
LVL 48

Expert Comment

by:PortletPaul
ID: 39255831
I have to agree about getting a "full list of names" - that's a tall order.
(e.g. what about cultures with totally different names and abbreviations (or that don't use abbreviations?)

but anyway, this service MIGHT be of some use
http://www.fakenamegenerator.com/
0
 
LVL 78

Expert Comment

by:arnold
ID: 39255996
Your best bet is to build it. I.e. when you collect information.
As others pointed out while bill, billy is short for some who are named William, another may not like to be called the shortened form.
This is why some people have nicknames that are the shortens version of their names and others do not.

I.e. maybe some one named Alex, aleksander, Might prefer Sasha versus Alex as the nickname.
0
 
LVL 48

Expert Comment

by:PortletPaul
ID: 39256088
or, allow folks to choose? saves an awful lot of effort
0
 

Author Comment

by:partners1998
ID: 39256174
Ok, thanks all for comments, but we do not need list of absolutelly ALL names for all cultures and countries, we think about most popular and most used names, at least something we can start from.
0
 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 39256635
Sorry but I am not aware of the existence of such list of first names synonyms.  You will probably need to associate these names yourself through data entry.
0

Featured Post

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

740 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