Select query: retrieve specific terms only when followed by a spac

A

Andrea Mann

Dear all,

I am trying to create a select query that will retrieve my specific text
terms only when they are followed by a space.

For example, one of my text search terms is "*hepatitis C*".
I want to retrieve "hepatitis C Cirrhosis" but not "hepatitis Cirrhosis".

Thank you in advance for your help!

Best,

Andrea
 
F

fredg

Dear all,

I am trying to create a select query that will retrieve my specific text
terms only when they are followed by a space.

For example, one of my text search terms is "*hepatitis C*".
I want to retrieve "hepatitis C Cirrhosis" but not "hepatitis Cirrhosis".

Thank you in advance for your help!

Best,

Andrea
Place a space before the wildcard.

Like "Hepititus C *"

Actually if you wish the user to enter the criteria, use a parameter
prompt:

Like [Search For] & " *"

The above will find the phrase if it is at the beginning of the field.
To fine the phrase anywhere in the field use:

Like "*" & [Search For] & " *"
 
Top