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

Parsing out just the last name

Status
Not open for further replies.

sawilliams

Technical User
Aug 23, 2006
98
US
Hello:

I am trying to query out just the last name from a "greeting" field. For the entry "Mr. Carlos A. Gibson", I just want "Gibson". Any assistance would be greatly appreciated.

SAW
 
A very rough way to get the last 'word' is to split at the last space. There is no guarantee that this is the last name as Mc Gregor and De La Fontaine will not come across:

[tt]Mid(SFName,InstrRev(SFName," ")+1)[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top