Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to search for records containing the search string?
Message
From
17/03/2004 03:53:57
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
17/03/2004 03:37:56
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00886980
Message ID:
00886986
Views:
15
>how to search for records containing the search string?
>
>say, my user entered "ELL", i want to be able to search into my table all records that contains the word "ELL" like "HELLO", "BELL", "SELLER"
>
>
select * from where like="%ELL%"
>
>can i do this using locate? i want to search in the same table, not to put the result in a table or a cursor.
>
>any help pls?

locate for atc('ELL',myField) > 0
locate for like('*ELL*',upper(myField))

etc. But such a search is slow.
PS: Your SQL version has a typo.
select * from where myField like "%ELL%"
If it's already upper cased as your SQL version proposes you might drop upper().
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform