Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL LIKE command
Message
From
18/08/1998 03:14:33
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
17/08/1998 14:00:47
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00127474
Message ID:
00127658
Views:
25
Jim,
All of the three suggestions were telling you that you need to include "%" as a char expression also and all would work provided you're looking for an existing value. Still they're not working means either :
1) You really don't have a match or,
2) You're not taking that into account that LIKE is case sensitive.
select * from task;
 where upper(description) LIKE ;
 "%" + upper(thisform.txtsearch.value) + "%"
Description would be typically a memo field and therefore not indexable. If not then also include an index tag with key upper(description).
Tip: If this is a vital part of your application and doesn't have 3rd party tools such as phDbaseIII, you may create n tags where n is len(description) and each with a key upper(substr(description,ix)). Looping the tags and performing a seek is much faster than SQL like.
Cetin



>Jim
>
>None of the three suggestions work, any other ideas?
>
>Jim
>
>
>>Jim,
>>
>>Try this;
>>
>>findtext = "%" + thisform.txtsearch.value + "%"
>>select * from task;
>>where description LIKE findtext
Ç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