10-03-2014 03:19 PM
I am looking for an efficient way of extracting the initials of a name. For example:
Benjamin J. Lincoln -> BJC
Andrew Benson Jones -> ABJ
L. Michael Andersson Curt -> LMAC
I will be glad for the assistance.
10-03-2014 03:27 PM
If you can be sure that the first letter of each name is always capitalized, it would be pretty easy to use the COMPRESS function to strip out lower case letters and non-alphabetic characters.
10-03-2014 03:51 PM
Do you have any names like:
Otto Van Dyke, where Van Dyke is the last name? Would you want OVD or OV?
or Miguel De La Cruz, De La Cruz being the last name?
Or how about former White House Press Secretary Jerald terHorst, who insisted that the first "t" in "terHorst" was not capitalized?
10-03-2014 05:36 PM
Not long ago I had to match children's names out of a data system where there was single name field. There was not set order for first name, middle name or initial or last names; suffixes such as Junior or Jr, Second or II or Third III could be any where in the field; last names of both mother and father could be present with or without hyphens; and names like Van Dyke, al Allassi, De La Cruz and more odd constucts. So when I see a relatively unstructured request about names I cringe and ask what some people may consider odd questions.
10-06-2014 03:31 PM
10-07-2014 04:15 PM
PROPCASE gives the wrong result for Jerald terHorst, who insists the first letter "t" in his last name is not capitalized, and the "H" in his last name is capitalized.
10-07-2014 03:51 PM
SAS Data Management has a name parse node which uses a known name dictionary and can parse a one field name input into multiple name tokens (name_prefix, first_name, middle_name, family_name, name_suffix). Then you could take the first initial of each using an expression node.