Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Gender Function Expand / Collapse
Author
Message
Posted Friday, January 19, 2007 9:51 AM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Friday, July 11, 2014 2:26 PM
Points: 696, Visits: 83

Hello everyone,

I need to write a SQL function that will determine if a given field in a
table is female, male, couple, business, or, unknown.  I know this will
require huge user defined lookup tables.  Any ideas on how I can begin
this ---> journals, samples, web sites?  Any input will be greatly
appreciated.

Have a good weekend.

--
Himansu

Post #338261
Posted Friday, January 19, 2007 10:00 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 7:11 PM
Points: 12,876, Visits: 31,789

well, it depends on the field you are examine...is the field a "name" field? so you are going thru the data and making a best guess at the gender, or does it need to be an absolute certainty?

you could start with a list of known male firstnames "(Timothy, William, etc" , a list of known female firstnames("Barbara","Stephanie", etc) and ASSUME those are the genders, then try amiguious names "(Leslie","Tony" etc) to assume unknown, and search for Co, company, Inc, LLC for company names.

let me know if my assumption is way off.

googling "boys names" is where i'd start with my list for filtering(first link: 11000 Baby Names, Meanings and Origins at Baby Names World), but you know that unless the data you are updating was captured up front, this will NEVER be bullet proof accurate, and may cause trouble later.

 

see this post on the same subject;

http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=215697



Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #338266
Posted Friday, January 19, 2007 10:22 AM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Friday, July 11, 2014 2:26 PM
Points: 696, Visits: 83

Lowell,

Thanks for the response.  That sounds like a good start, but how about variations in a name:

Mike, Michael, Micheal

** Especially when it comes to merge/purge processes.  This is turning out to be more complex than I anticipated.  Anyone out there in the merge/purge industry have any input?

 

--

Thnaks,

Himansu

Post #338279
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse