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

Please forgive if this is the wrong

Status
Not open for further replies.

loriek

Technical User
Jul 27, 2007
40
US
Please forgive if this is the wrong forum. I've got a query that utilizes [enter something here] to prompt the user for a value.

What I'd like to do is look for a like clause instead of =. For example, Select * from mytable where name like [enter something here].

The problem is my users have to add * before the text and after *Joe* in order to find Joe Smith, Joe Waltz, etc.

How can I handle placing the two * before and after the input?

Thanks... I know one of you will know....
 
How about:

[tt]Select * from mytable where name like "*" & [enter something here] & "*"[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top