Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combining firstname and lastname field, how do you do it
Message
From
18/05/1999 12:12:15
Donny Sims
Independent Computer Consultants Inc
Scottsboro, Alabama, United States
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00219772
Message ID:
00220071
Views:
30
>How does everyone else manage the firstname and lastname fields in a database?
>
>Do you create a third field called name which is updated by an update trigger?
>
>person.lastname = "Delay"
>person.firstname = "Evan"
>person.name = "Delay, Evan" (trigger fills in??)
>
>I find that I am constantly combining the first and last name together to present to the user or for indexes..etc..
>
>Or do you use a function or a class...?

My $.02US

I've allways used seperate fields and then combined as desired. I even go a step farther and add a third field for name suffix (Jr, Sr, MD, ect). My users must access the person's records while on the phone with them and can see that their is a John Smith Jr. and a John Smith Sr. grouped together on the interactive search screen. This allows them to clearify who they are talking to before bringing up the entire record. Of course if your users are doing input from a form this may not be an issue. This also eliminates the question of wheather its a multi word last name or has a suffix, so if you have Marcus Welby MD you can sort on Welby, Marcus MD not Welby MD, Marcus. I also forbid nonalphas in the name fields and ignore spaces in the primary index,i.e. O'Mally, O Mally and OMally are equilivant. I've developed these rules mainly to reduce duplicate records cause by inconsistent input of names, if you use a different key field (like a customer number) then they won't make a big difference.
Donny Sims

Life is what happens to us while were busy making other plans.
- John Lennon
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform