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:
00428633
Vues:
22
This message has been marked as a message which has helped to the initial question of the thread.
<<snip>>
>>Hi Nadya,
>>
>>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 Sergey,
>
>Not sure, I understand your idea:
>
>mapto='ABCFDG'
>lcSelList='AG8'
>?Chrtran(mapto, Chrtran(mapto, lcSelList, ""), "")
>
>
>Let me try to explain again:
>I'd like to select all records, which satisfy my criterion:
>
>In main table (from which I want to select), I have: (example)
>
>1   ABCD
>2   AB
>3   FG
>4   AF8
>
>etc.
>
>User selects A and 8, so records 1,2,4 should be selected.
>Note, also, what my control allows exclude items, IOW, if I check exclude option, only record 3 should be selected (doesn't contain A or 8).
>
>See?
>
>Thanks in advance.


Ok let's see ...

lcSelList='A8'
lcResult = Chrtran(mapto, Chrtran(mapto, lcSelList, ""), "")
mapto  lcResult
1 ABCD A
2 AB   A
3 FG
4 AF8  A8
Than criteria should be
lcCrit = [ Not Empty(mapto) AND Not Empty( Chrtran(mapto, Chrtran(mapto, lcSelList, ""), "")) ]

If you check exclude than criteria should be
lcCrit = [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