Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Indexing both FirstName and LastName fields together

Status
Not open for further replies.

PaulaB

Technical User
Mar 20, 2001
2
US
I have a large database with many forms and subforms. My users can't always remember names previously typed in. If I set the "lastname" field to indexed - no duplicates, they won't be able to have both John Smith and Joe Smith in the table. Is there a way to set the table to index both FirstName and LastName? Or is there a better way for my users to know that the record already exists?

Thanks
 
A bit skimpy on some details, but the simple answer is you may have compound indicies (e.g. LastName & FirstName). In any real db, this WILL not be possible as a UNIQUE index. You will need a field (or set of fields) which are 'guarnteed' to be unique for a Primary Key type on index. For perople, this is most commonly their SSN, although it is possible to use a modified soundex function to generate a unique Key based on the Names. A large body of info on the development of soundex indices is available for the English language names, but I have not seen much regarding other languages (but also never had occassion to really search).

MichaelRed
mred@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top