Name parsing routine
- From: "Matt Williamson" <ih8spam@xxxxxxxxxxx>
- Date: Thu, 4 May 2006 15:27:37 -0400
I'm looking for some input on the best way to accomplish this. I have a data
extract from Outlook that I'm parsing to go into a SQL table. I need to take
a Full name and put it into 6 fields. PrimaryFirst, PrimaryMiddle,
PrimaryLast, SecondaryFirst, SecondaryMiddle, SecondaryLast.
90% of the names fall into the following patterns:
FirstName Lastname
'Joe Anderson
FirstName MiddleName Lastname 'Joe
J. Anderson
Prefix FirstName MiddleName LastName 'Mr. Joe
J. Anderson
Prefix FirstName MiddleName LastName Suffix 'Mr. Joe
J. Anderson Jr.
FirstName and/& SecFirstName LastName 'Joe &
Jane Anderson
FirstName and/& SecFirstName LastName Suffix 'Joe & Jane
Anderson Jr.
Prefix FirstName and/& SecFirstName LastName 'Mr. Joe &
Jane Anderson
Prefix FirstName and/& SecFirstName MiddleName LastName 'Mr. Joe & Jane J.
Anderson
Prefix FirstName and/& SecFirstName LastName Suffix 'Mr Joe &
Jane Anderson Jr.
Prefix FirstName and/& SecFirstName MiddleName LastName Suffix 'Mr Joe &
Jane J. Anderson Jr.
Prefix FirstName and/& Prefix SecFirstName LastName 'Mr. Joe &
Mrs. Jane Anderson
Prefix and/& Prefix Firstname LastName 'Mr &
Mrs. Joe Anderson
Prefix and/& Prefix Firstname MiddleName LastName 'Mr & Mrs.
Joe J. Anderson
Prefix and/& Prefix Firstname MiddleName LastName Suffix 'Mr & Mrs. Joe
J. Anderson Jr.
I've decided that I'm going to drop all Prefixes and Append any Suffixes to
the Lastname field. I already have quite a bit of code, but it's getting
convoluted and messy at this point and I want to clean it up. Right now, I'm
just working with text files and writing the fields back to a new text file
after parsing. I'm really just trying to brainstorm on the most efficient
way to code the parsing routine/s. The way I'm doing it now isn't getting
all cases.
TIA
Matt
.
- Follow-Ups:
- Re: Name parsing routine
- From: Tony Proctor
- Re: Name parsing routine
- From: John Hatpin
- Re: Name parsing routine
- From: Saga
- Re: Name parsing routine
- Prev by Date: VCALENDAR email in VB6..
- Next by Date: Re: Way to check logged in by week HELP!!!
- Previous by thread: VCALENDAR email in VB6..
- Next by thread: Re: Name parsing routine
- Index(es):
Relevant Pages
|
Loading