Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Special Filter
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01090451
Message ID:
01090493
Views:
14
>>I need to filter in a list of products those contaning all words I type. Example:
>>
>>If I type "red pencils" and my list is:
>>
>>1-This are red pencils
>>2-Somes pencils are red
>>3- I need a pencil
>>
>>Only 1 and 2 satisfy the filter. Any easy way to do this with SET FILTER TO?
>
>set filter to " " + myField + " " LIKE '% ' + myFirstWord + ' %' and ;
>" " + myField + " " LIKE '% ' + mySecondWord + ' %'
BTW, using LIKE with % before the field makes it non-optimazable. If your table is small, that's not a big problem. Otherwise this problem was recently discussed and Peter De Valença member #021553 provided an algorithm.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform