Splitting names into Lname,Fname,Mname

  • Thread starter Thread starter saron123
  • Start date Start date
S

saron123

Guest
I want to split the name field in Access database to 3 different columns Lname, Firstname and Middle name/initial.

Below is some sample records with Lname,First name and Middle Initial/name.
PETERS M.D., WILLIAM A. III
BOUCEK, ROBERT J. JR.
MANSURD, ABDULRAZZAK
BADDIGAM, KRISHNAMOHAN R.
ABD EL AZIZ,AHMAD MOHAMAD
MEMON,MOHAMMED SALEEM
BREN-FIELDING,ALEXANDRIA
ABD EL AZIZ, AHMAD MOHAMAD
VAN GENUGTEN, RENATE E.
CHESNUT, CHARLES HAILE IV
LAW, MICHAEL W. Y.
NGUYEN, DAO VAN NGHIEM
STA. MARIA GANAL, JULIUS R
CAWAGAS, LAURITO JR LABIO
Please let me know.

Thank you.
Anish
 
Hi Sharon,

Welcome to Access World Forums. There is a pretty good search facility here and I'll bet you haven't tried it yet. I kind of like FoFa's solution in this thread.
 
Rural Guy -

Have to agree with your admonishment re using the search facility, but I'd sure be interested to see your take on how FoFa's post would solve the poster's problem, given the data she's posted.

Best wishes,

Bob
 
Last edited:
Below is some sample records with Lname,First name and Middle Initial/name.
PETERS M.D., WILLIAM A. III
and just how does this split into required fields?

Peter
 
We all know that that particular issue is far more complex than the OP realized. I didn't want to get into all of the issues since searching will reveal the various flaws in attempting the split. Fofa had one approach that has merit and could give the OP some hints on an approach. I doubt any of us would be able to point to one solution that would solve her problem completely.

Just my $0.02. Merry Christmas you guys.
 
Thank you guys for the reply. I will try the Fofa's post but I'm not sure it will help to solve the problem.

Anyway thanks for the help!

Sharon
 
Sharon,
As the posts suggest, this is not a trivial problem. The best solution is to have separate fields in the first place because putting them together again *is* trivial. Looking at your sample data, I would keep searching this and other forums for a more complete solution then Fofa's. Use google to look for solutions also. I remember seeing a professional ($$$) solution that didn't guarantee 100% accuracy. Good luck. Post back if you think we can assist in some way.
 
I did some googling and came up with at least one professional splitter called "Splitter" of all things. Here is a link to the site and it looks like it is only $39US which is not too bad. At least it is an option if you get up against the wall. I'm sure there are others out there.
 
going back to the issue of initial set-up of the database - i come at my access use from a document assembly background and am never satisfied with the set up of most databases with regard to names - in the original posting scottgem recommends using five fields - consisting of salutation, first, mi, last, and suffix - i prefer not using the suffix field and instead use a full name field, and add a sixth for conversational/nickname name - this gives me far more flexibility that the other method, makes coding for letters and documents much easier and generally handles all situations - for example, someone who uses an initial for their first name "H. Lee Smith", or doctors "John K. Doe, M.D.", judges, etc. - i realize this entails adding the name twice, but we generally have the fullname field default to a combination of the others and we generally find it very worthwhile in the long run - jim
 
Help stamp out ignorance!

Rural Guy:

Thanks! Makes perfect sense.

Bob
 
For what it is worth, I've personally attacked this problem more times than I know how to count any more. To make the long story very short, there is no single solution that works every time.

Just when you think you have a really good list of salutations, along comes someone whose first name is Doctor. (No, not kidding. Ran into that one 'bout twelve years ago. Left me with the question of what to call him if he made it through grad school. Doctor Doctor?

Then, in the Navy databases - and this extends to all military as I understand it, you run into something like JOHN NMN JONES. No, this isn't John Nathan Michael Norman Jones. It is "John (no middle name) Jones." Only with military, just like they have documents that would be blank except for the imprint, "This page intentionally left blank" (but then of course it isn't blank, is it?), you have to explicitly say "no middle name."

But Rural Guy has put his finger on the pulse of the problem. Therefore, Saron, I'm going to reinforce his suggestion. If you wanted the name parts separate, they should have been stored separately. As has already been pointed out, it is far easier to join things together than to take them apart. If separate name parts are critical to your DB operation, make them separate from the get-go. This after-the-fact stuff will make you tear out your hair.

Next question. How many names are we talking about? Because sometimes you can take the approach of doing it by hand if it is a small enough number.

Follow-up question. Admittedly if there are enough names this is impractical, too. But.... try getting your "splitter" routine to split the names. Now get Access to EXPORT the names to a comma-delimited text file along with some key field like an autonumber. Now go back in that file and note those places where an abomination occurred. Use NOTEPAD to add or remove commas to make the name "columns" match up. Now re-import the text file using the autonumber to allow you to put back the proper results via UPDATE query. In other words, take your best shot at automation and then tweak the result where your best shot wasn't quite good enough.

Let me put it another way. Life's too short to screw around trying to make the perfect name splitter when it is equally possible to just get close and adjust the result to final perfection. You'll get old and grey like I am before you "solve" the insoluble problem of people's choices of names.
 
I realize that this posting is quite old, but as someone searching the forums will likely land on it again (as I just did), and as any good IT person would be remiss to add just one more thought to an already drawn out conversation (not knocking anyone here, I'm making a joke at my own expense), there is the MS solution (see Outlook for an example) of having a basic name splitter that allows you to enter the name in a complete field, parses the name as best it can, stores the name parts in separate fields, but also has a catch that opens a separate window with the name parts shown separately if there are any "odd" arrangements in the name. For example, Mr. John D. Doe, Jr. would break up appropriately, whereas Mr. John H. H. Doe, Jr. would open the parsed information in separate fields for the user to edit, thereby ensuring that the information is stored correctly.

Of course, the underlying problem here is that a program is only as good as its worst user, so unless you know how to build the perfect end user....
 
Many times I deal with data in which we are purchasing loans from another company. I can't help how they store their data. If I were developing there system yes the names would be split. Infact that is what I am trying to make happen so that the data will work on our system.
I find it troubling to hear why was the data not stored correctly before when every company does things diffrently.
I guess what I am saying is instead of helping and becoming part of the solution you're basically telling us to stop bothering you with these trivial matters.
 
I guess what I am saying is instead of helping and becoming part of the solution you're basically telling us to stop bothering you with these trivial matters.
I respectfully disagree. I believe the point of this thread is that splitting names apart is simply *not* trivial.
 
Nicklaus Wirth, the inventor ("father") of the PASCAL language, is quoted as saying that 90% of all program problems are due to improper data design. I happen to agree.

Proper data design principles say: If you need the name parts to be separate, design them to be separate initially. Rules for putting names together are simple. Rules for taking them apart are not. Allowing the names to be input as a single string violates the KISS rule big-time. "Keep It Simple, Stupid."

This also falls under the "why buy trouble?" concept. Don't buy into a design that is GUARANTEED to give you headaches.
 

Users who are viewing this thread

Back
Top Bottom