Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PADR() and Friends
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00609404
Message ID:
00609497
Views:
15
All the PADR will do is guarantee that the length of the resultant field is 40. Is that the length of the resultant field? If you SELECT from a character type field of size 40 the resultant field will also be 40 regardless of the length of the TRIM() of the first entry in that field since spaces count as characters. Your post suggests to me that you are trimming the first name to remove spaces which is why you end up with a field of length 4. If you trim the PADR() expression you will undo the desired effect of PADR().
Hope this helps.

>I used PADR(origin,40) to make sure the names in the column chow up since I was using a SELECT. As you know, if the first name comes in with 4 letter, all the otrher names in that column will be truncated and have four letters. It ain't woking. I still get the truncation. I even tried, PADR(origin, 40, " "). Still didn't work. Do I need to SET something to ON or OFF?
Previous
Reply
Map
View

Click here to load this message in the networking platform