Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using RTRIM on a dbf field
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00445498
Message ID:
00445560
Vues:
23
>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?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform