Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Variations of using -'-'- (joining text fields)
Message
From
29/12/2000 13:00:33
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
29/12/2000 12:34:19
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00457664
Message ID:
00457861
Views:
17
>>>
>>>That's because "-" trims trailing spaces. Try
>>
>>Is this correct? I thought "-" moved the spaces to the end rather than trimming them.
>>
>>
>>
>>>
>>>lastName - ", " + firstName (or RTRIM(firstName))
>>>
>>
>>If LastName has trailing blanks I got
>>LLLLLL, FFFFFF
>
>I'm virtually ignorant of HTML and didn't realize the extra blanks would get trimmed out of my reply. It should have been
>
>LLLLLL,BBBBBBFFFFFF
>
>where "B" represents a blank
>
>>
>>
>>>or, to be more elaborate,
>>>
>>>ALLTRIM(lastName) + ", " + ALLTRIM(firstName)
>>
>>This looks like the best bet

It's reall a good bet :) I agree. However it might be the offending code in cases (ie:in SQL for it changes size). Wouldn't this work for you :

? '/'+chrtran(lastname-','-chr(27)-firstname,chr(27),' ')+'/'

This is a legal foxpro expression and it's quite hard to find ESC character in char fields (though legal in Fox).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform