Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TRANSFORM and stripping out characters
Message
From
27/08/2008 14:16:20
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
TRANSFORM and stripping out characters
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01342279
Message ID:
01342279
Views:
61
The resulting value of NewFieldValue is "999-99-99" which sort of makes sense in that it is nine characters, but why did it not strip out the "-" in the original value? This works if I just substitute "-" for the AlphaToStrip in the TRANSFORM.
FieldValue = "999-99-9999"
AlphaToStrip = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ`!@#$%*()-_=+[{]}\;:,<.>/?"'
NewFieldValue = EVALUATE("ALLTRIM(TRANSFORM(STRTRAN(FieldValue,AlphaToStrip,''), '@R " + REPLICATE('9',FieldLength) + "'))")
Next
Reply
Map
View

Click here to load this message in the networking platform