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

Parsing field in this format: SMITH ROBERT A

Status
Not open for further replies.

newyorkny

IS-IT--Management
Jun 30, 2004
189
HK
Hi friends:

I am importing data from a very old database (70s vintage) and it stores names in a 27-char field whose output is like:

SMITH ROBERT A

I would have thought that, even in the 70s this would have been a bad design, but there you are.

That goes into a field 'name' in the temp table I import into.

Would some kind 'Tipper guide me on how I might take that field and split it into a more appropriate format, i.e. "LAST" and "FIRST" and "MIDDLE"? The format of the orig is always LAST[space]FIRST[space]MIDDLE1[space]MIDDLE2[space]. (Some people have two middle initials).

I am most grateful for any assistance!

Thanks!

NY
 
Take a look at the InStr and Mid functions.
If ac2k or above you may consider a public function playing with the Split function.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top