Gender Function

  • 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

  • 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


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply