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

Multiple Text String query

Status
Not open for further replies.

kkowalski

IS-IT--Management
Feb 27, 2004
5
US
I have a text field, 255 char, free text input called {reasons}. I am trying to write a formula to query that field for multiple, possible text strings. For example, I will want to include all responses that include "fish", "culture" or "dance"

What is the best way to have the report query that field? I have tried several if then statements, InStr and no luck. Anyone have luck with this type of query?

 
If you are trying to create a conditional formula which returns that field only if it meets these criteria, then try:

If instr({table.reasons},"fish") > 0 or
instr({table.reasons}, "culture") > 0 or
instr({table.reasons}, "dance") > 0 then {table.reasons} else ""

If you only want to return records that contain these words in this field, then go to report->edit selection formula->record and enter:

instr({table.reasons},"fish") > 0 or
instr({table.reasons}, "culture") > 0 or
instr({table.reasons}, "dance") > 0

-LB
 
Older version prior to 9 do'nt make research on text fields greater then 254 !
that maybe the reason
try to do that on the server side via sql

django
bug exterminator
tips'n tricks addict
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top