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

Search for text string 1

Status
Not open for further replies.

bergis

Technical User
Jun 21, 2001
42
GB
Hi,
in a database I am working with there is a field where the data entered by the users are an description of an operation they are doing, Its in a table called OPSUM, and the main fields are PHASE, TASK and ACTIVITY, these contain a code to describe what they were doing, and then there is a fourth field; OPER, which contains text to describe the operation. I want to search this field for occurrences of a particular text string (in this case "test bop", where TASK="BOP" and ACTIVITY="a". Does anyone know what kind of expression I have to use to search for a word anywhere inside a text string?
thanks
Kjell
 

You can use the INSTR function or the LIKE predicate.

Select *
From Table
Where Instr([OPER],"test bop")>0

Select *
From Table
Where OPER Like "*test bop*" Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top