Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Search Contents of Memo Field for a String
Message
From
10/09/2001 09:06:44
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
10/09/2001 09:02:59
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00554573
Message ID:
00554594
Views:
13
>>Cetin
>>
>>>>select * from mytable where myMemo like '%'+lcSearch+'%'
>>Just tried this, and it works! Thanks. I would have never figured this out...where does the % operator come from? All my usual sources just show this as the modulus operator for arithmatic.
>>
>>Thanks again.
>>
>>--- Larry
>
>It comes from SQL itself. I don't know where it's documented more detailed but check 'Select - SQL command'. Examples 8-11 (not 11 it might confuse).
>'%' and '_' stand for wildcard chars in SQL 'LIKE' operator (* and ? in DOS).
>Cetin

BTW if you would use this purely in VFP then
atc(lcSearch, mymemo) > 0
might be better because it's case insensitive (upper(myMemo) like '%'+lcUpperedSearch+'%' would do the same and portable).
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