Solved

Smart first name matching in TSQL

Posted on 2013-06-18
9
358 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
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

680 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