Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT with SPACE() question
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00469200
Message ID:
00469215
Views:
13
>>>I can’t get this right.
>>>I want to SELECT and at the same time make the field longer.
>>>Let say the field is 1 char long. I want to select it into my updateable cursor and make it 6 char long
>>>
>>>SELECT charfield FROM Cursor && will give me just the one char long as it is, so I tried:
>>>SELECT SPACE(charfield,6) FROM Cursor && and lots of other variations and I can’t get it to work
>>>There has to be a way to do this!
>>>Suggestions?
>>
>>Try:
SELECT PADR(ALLTRIM(charfield), 6) as charfield...
>
>FYI, you don't need the ALLTRIM(). PADR will pad the value if shorter or truncate it if longer than the specified length.

Doh! Of course...Well, it's Friday and I'm going to blame it on the shot I had this morning at the orthopedist's.:-) Sounds like it's near time for my favorite movie..."Crack a Cold One - East of Java Beans"< bg >
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform