Querying "LIKE"

  • Thread starter Thread starter Suzette
  • Start date Start date
S

Suzette

I'm using the LIKE keyword for looking up information in a table in my SQL
statement. The problem is when my user enters "Thomas Smith" and the entry
in the database is "Thomas A Smith". I'm wondering if there is any simple
way around it without having parse the words and write SQL statements after
parsing.

Any suggestions or links to hints would be thoroughly appreciated.

Thanks

Suzette
 
This will find that record:

WHERE [Fieldname] Like "Thomas*Smith"

Now, the trick will be to take your user's input and insert appropriate
wildcards. Perhaps, if you tell your user to just enter the first part of
the name:

WHERE [Fieldname] Like "Thomas*"
 
Back
Top