I have a NAME field with a person's full name. I have also created a first
name, middle name and last name field and use the LEFTWORDS(name,1),
MIDDLEWORDS(name,2,1), and RIGHTWORDS(name,1), functions to split up the
full name.
My problem is if a name doesn't have a middle initial or name. How do I get
a blank if there isn't a middle initial or name so that it doesn't repeat
the last name?
I am splitting up the name so that my database can be sorted on last name.
Thanks in advance.
|
|
0
|
|
|
|
Reply
|
MuniciNET
|
4/13/2006 3:19:57 PM |
|
There are many ways to do this.
A funny one could be :
YrMiddleName (calc) = Case(MIDDLEWORDS(name,2,1) = RIGHTWORDS(name,1), "",
MIDDLEWORDS(name,2,1))
Remi-Noel
"MuniciNET" <dan@mmsit.net> a �crit dans le message de news:
M6GdnbodL60k8aPZnZ2dnUVZ_vqdnZ2d@lbdsl.com...
>I have a NAME field with a person's full name. I have also created a first
>name, middle name and last name field and use the LEFTWORDS(name,1),
>MIDDLEWORDS(name,2,1), and RIGHTWORDS(name,1), functions to split up the
>full name.
>
> My problem is if a name doesn't have a middle initial or name. How do I
> get a blank if there isn't a middle initial or name so that it doesn't
> repeat the last name?
>
> I am splitting up the name so that my database can be sorted on last name.
>
> Thanks in advance.
>
|
|
0
|
|
|
|
Reply
|
Remi
|
4/13/2006 3:40:10 PM
|
|
I just thought of something else, how do I handle a company?
Would it make more sense to enter names as seperately then join or combine
them? Then again, what would I do with company names?
"MuniciNET" <dan@mmsit.net> wrote in message
news:M6GdnbodL60k8aPZnZ2dnUVZ_vqdnZ2d@lbdsl.com...
>I have a NAME field with a person's full name. I have also created a first
>name, middle name and last name field and use the LEFTWORDS(name,1),
>MIDDLEWORDS(name,2,1), and RIGHTWORDS(name,1), functions to split up the
>full name.
>
> My problem is if a name doesn't have a middle initial or name. How do I
> get a blank if there isn't a middle initial or name so that it doesn't
> repeat the last name?
>
> I am splitting up the name so that my database can be sorted on last name.
>
> Thanks in advance.
>
|
|
0
|
|
|
|
Reply
|
MuniciNET
|
4/13/2006 3:42:08 PM
|
|
Now you know why it's better to build a full name from the parts then to try
to get the parts from a full name.
The easiest way to solve your problem is to assume:
1) There are always at least two words in a name.
2) The first word is always the first name.
3) The last word is always the last name
4) If there are only two words, there is no middle name
5) Otherwise, everything but the first and last words are the middle name
These are not the best assumptions because sometimes a first or last name
can have more than one word! ("Words" being defined by spaces.) And what
would you do about "Prince" and "Madonna?"
Nevertheless... given the above, your LeftWords() and RightWords() functions
are fine... What needs spiffing up is what you are using for the middle.
You'll need to use an If() statement. In English:
If there are only two words in the name then forget it, otherwise show me
everything but the first and last words.
If (test, result1, result 2)
is the format of the If() statement.
If ( WordCount(name) >2 ,
MiddleWords ( name, 2, WordCount(name) - 2),
"" )
Is the full If() statement.
- Bill
"MuniciNET" <dan@mmsit.net> wrote in message
news:M6GdnbodL60k8aPZnZ2dnUVZ_vqdnZ2d@lbdsl.com...
>I have a NAME field with a person's full name. I have also created a first
>name, middle name and last name field and use the LEFTWORDS(name,1),
>MIDDLEWORDS(name,2,1), and RIGHTWORDS(name,1), functions to split up the
>full name.
>
> My problem is if a name doesn't have a middle initial or name. How do I
> get a blank if there isn't a middle initial or name so that it doesn't
> repeat the last name?
>
> I am splitting up the name so that my database can be sorted on last name.
>
> Thanks in advance.
>
|
|
0
|
|
|
|
Reply
|
Bill
|
4/13/2006 3:59:44 PM
|
|
Company names, now? How are you going to tell the difference between
Marriott Corp
and
Bill Marriott
?
If you're starting from scratch the very best thing you could do is to store
everything in discreet fields:
FirstName
LastName
MiddleName
Company
Address1
Address2
City
State
Zip
You can easily combine these later on... much more easily than trying to
pick apart everything lumped into a single field.
Bill
"MuniciNET" <dan@mmsit.net> wrote in message
news:rLidnUlqIPxw7KPZRVn-ug@lbdsl.com...
>I just thought of something else, how do I handle a company?
>
> Would it make more sense to enter names as seperately then join or combine
> them? Then again, what would I do with company names?
>
>
> "MuniciNET" <dan@mmsit.net> wrote in message
> news:M6GdnbodL60k8aPZnZ2dnUVZ_vqdnZ2d@lbdsl.com...
>>I have a NAME field with a person's full name. I have also created a first
>>name, middle name and last name field and use the LEFTWORDS(name,1),
>>MIDDLEWORDS(name,2,1), and RIGHTWORDS(name,1), functions to split up the
>>full name.
>>
>> My problem is if a name doesn't have a middle initial or name. How do I
>> get a blank if there isn't a middle initial or name so that it doesn't
>> repeat the last name?
>>
>> I am splitting up the name so that my database can be sorted on last
>> name.
>>
>> Thanks in advance.
>>
>
>
|
|
0
|
|
|
|
Reply
|
Bill
|
4/13/2006 4:51:54 PM
|
|
That's what I thought afterI posted my question. Thanks for your responses
though, Bill.
Dan
"Bill Marriott" <wjm@wjm.org> wrote in message
news:I5KdncDvMeg3HKPZnZ2dneKdnZydnZ2d@comcast.com...
> Company names, now? How are you going to tell the difference between
>
> Marriott Corp
>
> and
>
> Bill Marriott
>
> ?
>
> If you're starting from scratch the very best thing you could do is to
> store everything in discreet fields:
>
> FirstName
> LastName
> MiddleName
> Company
> Address1
> Address2
> City
> State
> Zip
>
> You can easily combine these later on... much more easily than trying to
> pick apart everything lumped into a single field.
>
> Bill
>
> "MuniciNET" <dan@mmsit.net> wrote in message
> news:rLidnUlqIPxw7KPZRVn-ug@lbdsl.com...
>>I just thought of something else, how do I handle a company?
>>
>> Would it make more sense to enter names as seperately then join or
>> combine them? Then again, what would I do with company names?
>>
>>
>> "MuniciNET" <dan@mmsit.net> wrote in message
>> news:M6GdnbodL60k8aPZnZ2dnUVZ_vqdnZ2d@lbdsl.com...
>>>I have a NAME field with a person's full name. I have also created a
>>>first name, middle name and last name field and use the
>>>LEFTWORDS(name,1), MIDDLEWORDS(name,2,1), and RIGHTWORDS(name,1),
>>>functions to split up the full name.
>>>
>>> My problem is if a name doesn't have a middle initial or name. How do I
>>> get a blank if there isn't a middle initial or name so that it doesn't
>>> repeat the last name?
>>>
>>> I am splitting up the name so that my database can be sorted on last
>>> name.
>>>
>>> Thanks in advance.
>>>
>>
>>
>
>
|
|
0
|
|
|
|
Reply
|
MuniciNET
|
4/13/2006 4:55:14 PM
|
|
In article <3JadnZ9Pf4bt6KPZRVn-ig@comcast.com>, "Bill Marriott"
<wjm@wjm.org> wrote:
> Now you know why it's better to build a full name from the parts then to try
> to get the parts from a full name.
>
> The easiest way to solve your problem is to assume:
>
> 1) There are always at least two words in a name.
> 2) The first word is always the first name.
> 3) The last word is always the last name
> 4) If there are only two words, there is no middle name
> 5) Otherwise, everything but the first and last words are the middle name
>
> These are not the best assumptions because sometimes a first or last name
> can have more than one word! ("Words" being defined by spaces.) And what
> would you do about "Prince" and "Madonna?"
Of course there are other problems here too:
- some names are backwards (eg. Asian names) with the family
name being first and the person's name being last,
- hyphenated names or double-barrelled names without a hyphen
etc.
As someone else suggested, it's usually better to have the names
entered as separate fields, then you can combine them in anyway needed
via Calculation fields or Merge fields. even then the person entering
the data has to make a guess in some cases ... especially since people
rarely fill out forms correctly (often putting their name backwards) or
readably. :o(
You may also need a Title field into which you can enter Mr, Mrs, etc.
so that letters without a first name can be addresses to "Mr Jones" or
"Mrs Smith".
Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)
|
|
0
|
|
|
|
Reply
|
Helpful
|
4/13/2006 8:45:59 PM
|
|
Ad a suffix field for Jr., III, Esq.
The permutations go on and on :)
"Helpful Harry" <helpful_harry@nom.de.plume.com> wrote in message
news:140420060845598649%helpful_harry@nom.de.plume.com...
> You may also need a Title field into which you can enter Mr, Mrs, etc.
> so that letters without a first name can be addresses to "Mr Jones" or
> "Mrs Smith".
|
|
0
|
|
|
|
Reply
|
Bill
|
4/13/2006 9:13:53 PM
|
|
In article <fIedncZmfK-MIqPZRVn-uQ@comcast.com>, "Bill Marriott"
<wjm@wjm.org> wrote:
> "Helpful Harry" <helpful_harry@nom.de.plume.com> wrote in message
> news:140420060845598649%helpful_harry@nom.de.plume.com...
> >
> > You may also need a Title field into which you can enter Mr, Mrs, etc.
> > so that letters without a first name can be addresses to "Mr Jones" or
> > "Mrs Smith".
>
> Add a suffix field for Jr., III, Esq.
>
> The permutations go on and on :)
True. You could then add a field for Maiden name so letters get
addressed to:
Mrs Mary Anderson nee Franklin
or how about extending it further to:
Mrs Mary Anderson nee Franklin
daughter of Jenny Franklin nee Wellington
daughter of ...
;o)
Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)
|
|
0
|
|
|
|
Reply
|
Helpful
|
4/14/2006 3:08:59 AM
|
|
|
8 Replies
217 Views
(page loaded in 0.072 seconds)
Similiar Articles: Splitting a srting at the last occurance of "/" - comp.lang.awk ...All. I need to seperate the path from the file name - extension in a shell script. So far I have ${0%.*} to give me the file name and path, and ${0#... Split full name in to first, middle, and last name - comp ...Hello group! The full name is stored in the "title" in "mytable", with some Google job, I managed to do: select left(title,InStr(title,' ')) AS fname... Splitting into a multi-dimensional array - comp.lang.javascript ...I am trying to split a sting into a multi-dimensional array. ex. value = "lang~1#name~bob#age~37#"; And I want to be able sperate the date to look l... How can I combine incrementing variable names? - comp.soft-sys ...I have a program that can record an event over time and it saves the recording as a single file. I can then tell the program to split this file up in... Split string at specific character - comp.soft-sys.matlab ...Actually DATAREAD does the job in Matlab 6.5 to 2010b, if one considers to ask for '\\' under Windows instead of '\', if one wants to split a path name. help with split config macro - comp.cad.solidworksSave as DWG macro - comp.cad.solidworks help with split config macro - comp.cad.solidworks Part Name Extraction for DXF Macro - comp.cad.solidworks ... named common and subprogram names - comp.lang.fortranSplitting Names - comp.databases.filemaker named common and subprogram names - comp.lang.fortran Split full name in to first, middle, and last name - comp ... vector splitting to many vectors - comp.soft-sys.matlabDear all, is there a way to easily split a long vector in many different vectors ... you don't want to do this > in a loop so you need to supply all the output names at ... SQL and first. or last. - comp.soft-sys.sasSplit full name in to first, middle, and last name - comp ... Hello group! The full name is stored in the "title" in "mytable", with some Google job, I managed to do ... Naming a new architecture - comp.compilers.lcc... message also: [root@webdata root]# createuser Enter name of user to add ... Since modern systems (OS X, at least) allow user- and group names with spaces in, splitting on ... Splitting a Name into First and Last NamesAlthough splitting a name into the first and last names is not a major task, it's not quite as trivial as you might first expect due to potential variations. Splitting names - Online Aspect by Josh FraserThe quest. I’m on a ongoing search to find the best algorithm for splitting a full name into a first name and a last name. I’m sure this sounds like a ... 7/9/2012 12:30:27 PM
|