• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 383
  • Last Modified:

In Access SQL, How Can I make A Query that Selects Records that Contain All or Part of a String

I need a Query with a WHERE Clause that picks up on strings, or parts of a string, in a field that may contain multiple text strings besides the ones I am trying to selectively choose.
0
Rex85
Asked:
Rex85
1 Solution
 
LambertHeenanCommented:
If I understan the question correctly, you have a text field that may contain lots of data, say "Your assistance is requested for the following question. It has been marked as neglected and is now eligible for bonus points" and you need a query that will find records that have, for example, the phrase "is requested", ragardless of what else is in the field.

If so, then assuming the field is called txtInfo, and the table is called Table1, the SQL would be

Select * from Table1 Where txtInfo Like "*is requested*".

Or if the data is actually soted in SQL Server...

Select * from Table1 (Where txtInfo Like "%is requested%".
0
 
Rey Obrero (Capricorn1)Commented:

you can try this


Where [field] like "*" & yourstring & "*"


in QBE design

Field      [FieldName]
Table

Criteria  like "*" & yrString & "*"





or

Field      [FieldName]
Table

Criteria  like "*" & [Enter String] & "*"

0
 
Rex85Author Commented:
thanks!. I just needed the simpler version to make it work.
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now