Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Letters should be found in a string - what is the best?
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00428574
Message ID:
00428647
Vues:
25
This message has been marked as a message which has helped to the initial question of the thread.
<<snip>>
>>Here we go :)
>>
>>* return criterion for field value
>>lnLen=alen(.btcSelArray, 1)
>>lcSelList = ""
>>for li = 1 to lnLen	&& cycle over rows in the array of selected items
>>	lcSelList = lcSelList + .btcSelArray[li]
>>endfor
>>
>>lcCrit = [ (Not Empty(]+mapto+[) AND Empty( Chrtran(]+mapto+[, Chrtran(mapto, lcSelList, ""), "")) ]
>>
>
>Hi again Sergey,
>
>I thought a little bit more, and understood, what you're right and I was wrong in my assumption. I asked my manager, to be sure.
>If a person selects 2 or more items, it means, what all items should be found in the same record, so your solution should work.
>
>lcCrit = [(Not Empty(]+mapto+ ;
>[) AND Empty(Chrtran(]+mapto+[, Chrtran(]+mapto+[, lcSelList, ""), "")))]
>
>If a person turns on exclusion flag, that means, what he/she doesn't want records, which may contain one of the items, he/she selects.
>
>lcCrit = [(Empty(]+mapto+ ;
>[) or Not Empty(Chrtran(]+mapto+[, Chrtran(]+mapto+[, lcSelList, ""), "")))]
>
>??????

I was wrong too.
If you want all selection to be presented in the record than
lcCrit = [Not Empty(mapto) AND Len(Chrtran(mapto, Chrtran(mapto, lcSelList, ""), "")) = Len(lcSelList)]
For exclusion
lcCrit = [Empty(mapto) OR Empty(Chrtran(mapto, Chrtran(mapto, lcSelList, ""), "")) ]
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform