Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with preventing duplicate full names
Message
De
21/12/2003 17:23:50
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00861111
Message ID:
00861142
Vues:
26
>I have a form that has txt.mail_name. At first mail_name is copied in from another source and it is something like 'JOHNSON FRANK L & DORIS M", or 'JOHNSON FRANK L & STIEN DORIS M' once it is edited it becomes something like 'Frank & Doris Johnson'. The editing is done by hand so it is never exact. I am trying to prevent duplicate mail_name in my table. Looking for ideas on how to prevent this.
>
>Thinking that I could find the last name and then show a browse window of other matching last names.
>
>Guess that if mail_name is still in upper case, I know that the last name is the first word. And if mail_name is in proper case I know that the last word is a last name and if there are two words before the ' & ' is probablu a last name.
>
>Does anyone have any ideas or tips on preventing duplcate names?

Check soundex() function. You may
select * from names where upper(last_name)=upper(lcLastName) and ;
   soundex(first_name)=soundex(lcFirstName)
or something like that (maybe also soundex() of the last name as well). Depending on the number of hits, you may OK the entry, or show a list of entries in a little modal form, with a listbox with names found, and a few buttons like "use selected", "none of them", "cancel, re-enter". That's what I do in some apps during name entry.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform