Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replace !empty(alias.field) with len(alias.field)>0
Message
 
 
À
14/02/2016 15:46:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01631431
Message ID:
01631440
Vues:
43
>>>Perhaps this will do, then:
>>>
>>>m.lcInput = "Mytable.FieldXyx = '233' and (MyTable.Field233 > 344) and !empty(mytable.myfield) and someothertable.field3 = '333'"
>>>m.lcHold = STREXTRACT(m.lcInput,"!empty(",")",1,5)
>>>m.lcOutput = STRTRAN(m.lcInput, m.lcHold, "LEN" + STREXTRACT(m.lcHold,"(",")",1,4) + ">0")
>>>
>>
>>Perfect. Thank you very much.
>
>You're welcome.
>
>Just remember that if "!empty()" may occur more than once, then you'll have to consider insert a DO WHILE loop until the function is completely replaced in the expression.

Good point. Thank you for bringing it up.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform