Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using RTRIM on a dbf field
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00445498
Message ID:
00445560
Views:
16
>I have been reading the help files for the past 5 days and trying to find
>solutions using any of the 'Trim' functions to produce the results I needed. I
>must be missing something since Larry's suggestion:
>
>Try right(rtrim(lastname),3)
>
>did not appear in the help files I was looking at.

That's because the assumption is that you know Fox uses fixed-length fields -- you can't represent a VarChar with a DBF. If you take the right three characters of a field that isn't completely filled, you will only get spaces. If you use RTRIM() first, you will get a string back that has the spaces trimmed off the right side. Then, RIGHT() will do what you expect.
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Previous
Reply
Map
View

Click here to load this message in the networking platform