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

Searching a character field for a character string 2

Status
Not open for further replies.

psalyer

Technical User
Jun 20, 2001
30
US
Hi all, I want to search a character field that is 45 characters wide in the entire table for the occurence of a character string. This string could appear anywhere in the field. Example: the field has "ACTUATOR, YAW" in it. I search for the occurence of the string "YAW" and I need it to find this record. Probably pretty simple.

Pete
 
Hi Pete,

See the AT() function, or use the $ operator:

LOCATE FOR 'YAW' $ field1

Jim
 
i use this code line to see all examples in a file

brow FOR AT("YAW", upper(yourfieldnamehere)) > 0

Pete Bloomfield
Down Under
 
A nice fucntion to use is:

OCCURS().

This will give you the number of ocurrences of your string. if the result = 0, no occureences of your string are there.

HTH,
Weedz (Wietze Veld)
My private project:Download the CrownBase source code !!
 
Even more flexible is the ATC() function. This variation of AT() is case INsensitive, which can save a lot of headaches.

Regards,
Thom C.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top