Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Removing blanks in a field
Message
From
21/12/2004 10:28:18
 
 
To
21/12/2004 10:18:24
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00970912
Message ID:
00970998
Views:
15
Note that I used CHRTRAN() in stead of STRTRAN(). In this case it won't make any difference, but it is more felxible because you can easily add more characters to strip by putting them between the first set of apostrophs.

>Yes I just tried that (PADR) and that is better.
>
>Nick
>
>>SELECT PADR(CHRTRAN(fieldname," ",""),len(fieldname)) AS fieldname FROM tablebname
>>
>>>>>>I have a field in a table whereby users will enter the name of a supplier. A supplier name could be 'Le Poutre'. In my query I want to remove the spaces in the field. How can I do this so the result would be 'LePoutre' instead of 'Le Poutre'.
>>>>>>
>>>>>>Mnay Thanks in advance
>>>>>Neil
>>>>>
>>>>>Try
>>>>>
>>>>>SELECT STRTRAN(fieldname," ","") as fieldname FROM tablename
>>>>>
>>>>>Nick Mason
>>>>
>>>>
>>>>this might or might not work.
>>>>if the first record contains only a 'a' for example the width of the column will be 1 even if the content of this field in the second record is 159 charcters wide!!!!
>>>>
>>>>Peter
>>>Your are right. My carelessness
>>>
>>>so how about
>>>
>>>
>>>
>>>where nn is the length of the field
>>>
>>>
>>>Nick
Previous
Reply
Map
View

Click here to load this message in the networking platform