Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parsing string FIRSTNAMEMIDDLELASTNAME 1

Status
Not open for further replies.

qfkeon

Programmer
May 29, 2001
58
0
0
US
I am tring to devise a plan to convert name data that exists in one field (30 char) and is all uppercase. I need to somehow parse the names so that I can move them into their own fields. I also need to convert the names so that they are proper title case (Name instead of NAME).
 
Doing anything with names like this is a dicey proposition. Since you don't specify, I assume the name is in LFM order and that no separator is present, e.g. DOE JAMES ADAM?? Lack of a separator(normally a comma) can be a killer given that there are multiple word last names (e.g. Oscar de la Renta). Applying title case works OK in many cases, but you have to deal with lot's of special stuff like L'Hereaux, Smith-Jones, macAdams, McMillan, etc.

In several cases where I've faced issues like this, I've developed general purpose algorithms and then allowed for special cases by, for instance, keeping a list of odd names and their capitalization
 
Thank you 3gm for the response. The names are in Last, First, Middle order and there are no separators. My primary concern is, how do I parse the strings into their various components? Do I need to create a list of names to reference them against? Read each character one at a time into a variable and build a name, applying the variable truth value against the table of names after each read?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top