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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to separate full name string into first name and last name fields

Status
Not open for further replies.

aug4570

Technical User
Jul 6, 2000
74
US
The field in the database has "Tom Thumb" and when I get this value from the database I want to separate it into a first name field "Tom" and a last name field "Thumb". Is there a string method that separates a string at a space? Thanks
 
This would be a "best effort" basis, as there are many things in the real world which complicate this:

- People with Jr., Sr, Esq. appended on the end of their last name
- People who put their title or rank in the first name field: Dr., Mr., Prof, Sgt.
- People from hispanic countries who have multiple middle names (ever watch "The Princess Bride"?)
- Asian names where a first & last name might not have a space separator.
- People from Mongolia, who until very recently, only had one name (when the communists came to power, they discouraged the use of clan names).

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Always so negative chiph. Look at it this way everybody who has more then one firstname and more then one last name will be fired or killed wich ever is the least effort.

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Always so negative chiph. Look at it this way everybody who has more then one firstname and more then one last name will be fired or killed wich ever is the least effort.

One of my interests is internationalization, so whenever I see someone making assumptions like this (format of a person's name, date, phone number, etc.), I have to jump in.

It's pathological, I know. But until they have medication for it, it's what I do. ;-)

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top