Parsing names

mikemaki

Registered User.
Local time
Today, 22:33
Joined
Mar 1, 2001
Messages
81
Does anyone know of an expression I could use in a query to parse a full name field into last name, first name and middle initial?
 
re:

Hi,
how are the values seperated (e.g. by space or comma or...)?
You might find this article helpful to get started.
HTH
Good luck
 
From experience this depends on how things are done.

I have a routine that takes a "fullname" field, splits it down to it's constituent parts and then attempts to make a "firstname", "initial" and "lastname" field out of it. (or it's big brother that ignores the initial altogether)

The fun beings when you consider that you can have double-barrelled first or surnames.

effectively what mine does it take a name field, split the entire field using space as a separator and then do the following

1) If it's 2 fields split them into firstname and surname
3) if it's 3 fields and the relevant "initial" field is 1 character long split them into Firstname, initial and Surname
4) If it's 3+ fields long, attempt to establish, using tblfirstname and tblsurname what format "anne marie jones" or "Jean Claude Van Damme" should be. If it's never encountered "Anne Marie" as a definite firstname/surname, it prompts you to tell it what the format should be and will use it for that instance only or for every instance that it comes across afterwards.
 

Users who are viewing this thread

Back
Top Bottom