Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replace !empty(alias.field) with len(alias.field)>0
Message
De
14/02/2016 15:46:04
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01631431
Message ID:
01631439
Vues:
52
>>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.
----------------------------------
António Tavares Lopes
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform