Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Special Filter
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01090451
Message ID:
01090493
Vues:
13
>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform