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:
00445499
Views:
12
Try right(rtrim(lastname),3).

>Please bear with me. I am a 5 year Access user moving to VFP 5.0 for the purpose of process large .dbf files containing names and addresses. So here's the question:
>
>For purpose of record filering and various duplication scans a create a new field call 'combine'. In Access I would update that field with the first 3 characters of the 'FirstName' field, the 'PostalCode' field and the last 3 characters of the 'LastName' field. For the extraction of the 'FirstName' field I would use - Left([FirstName],3). For the extraction of the 'LastName' field I would use - Right([LastName],3). This all worked fine in Access and worked well in FoxPro except for getting the last 3 characters of the 'LastName' field.
>
>When I try to get the last 3 characters of the 'LastName' field in FoxPro it returns blanks. If I increase the 3 to 10 then I get some characters returned on some records. It seems to me that FoxPro looks at the 'LastName' field ( which is set to Character 30 ) and returns whatever it reads from the right of the field ( space or otherwise ) and returns it as 3 characters which could be all blank.
>
>How can I tell FoxPro to read the last 3 characters will ignoring spaces after the person's name in the 'LastName' field?
>
>Thanks
>
>Peter
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform