Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compare one field with another (numbers)
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00448219
Message ID:
00448403
Views:
16
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform