Using LIKE in SQL

C

CAROL

Hi . Trying to set up a query for a user where the user can enter a portion
of the text and the query will go out and find every record that contains
that string of text.

In my query - (design view) - under the criteria section, I have :
Like [Find records like:] & '*'

This logic will return records ONLY where the BEGINNING of the value
searched is entered. Example: If the user keys in MED... this logic will
only return every record that BEGINS with MED. I want the logic to return
every record that contains MED...regardless if the record starts with MED or
MED is found in the middle of the string. (i.e. would want to find:
nonMEDical and MEDical)

Any suggestions? Am I missing something very obvious? THANK YOU
 
R

Rick Brandt

CAROL said:
Hi . Trying to set up a query for a user where the user can enter a
portion of the text and the query will go out and find every record
that contains that string of text.

In my query - (design view) - under the criteria section, I have :
Like [Find records like:] & '*'

This logic will return records ONLY where the BEGINNING of the value
searched is entered. Example: If the user keys in MED... this
logic will only return every record that BEGINS with MED. I want the
logic to return every record that contains MED...regardless if the
record starts with MED or MED is found in the middle of the string.
(i.e. would want to find: nonMEDical and MEDical)

Any suggestions? Am I missing something very obvious? THANK YOU

Like '*' & [Find records like:] & '*'
 
Top