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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filtering records problem

Status
Not open for further replies.

SherryLynn

Technical User
Feb 4, 2001
171
CA
Hello,

I have a database that has a LastName field. The last name field can contain several last names. Here is how a typical LastName is entered:

Smith xx Johnson xx Russell

Now, I would like to filter records in the database to pull up say all Johnson files. When I attempt to use the filter/sort, it only looks at those records with an exact match, so I would only get the records that just have Johnson as the LastName. I am still learning and need some help figuring out how to do this.

Can anyone help with this?

Thanks very much,
Sherry
 
Take a look at the Like operator (and at normalistion ...)
(LastName Like 'Johnson *' Or LastName Like '* Johnson *' Or LastName Like '* Johnson')

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks PHV, I will try that out. Yes, normalization would be nice - too bad they didn't create the DB like that. There are over 7000 records on families with multiple fathers, etc.

Sherry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top