Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Compare one field with another (numbers)
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00448219
Message ID:
00448403
Vues:
20
>Could you go a further in your explaination?
If we were talking about zip codes, ALLTRIM(' 9') # '00009' but
VAL(ALLTRIM(' 9')) == VAL('00009').
My point is to compare the VAL() of the numeric strings rather than the strings themselves. For absolute equality, again for zip codes which are five digits, you can compare:
PADL(VAL(zip_code),5,'0')
This totally eliminates the leading zero issue.
HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform