Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I force a column to be a fixed size
Message
From
17/03/2005 11:13:40
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 7 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00996831
Message ID:
00996850
Views:
14
>>I build the content of a column from a UDF within an SQL construct. The max size for that column will be 154. But After some testing the width seems to become determined after the first result that came out of the UDF. So if the width is 8 then it's fixed for all the columns so I lose many information in some records.
>>
>>Is there a way to fix the size of a column whatever the size of what will go into it?
>
>
SELECT PADR(myudf(...), 154) AS whatever, ...
>
>* or in UDF
>...
>RETURN PADR(Returnvalue, 154)
>
Thank you Sergey. But I feel a bit stupid because yesterday Borislav Borissov game me a solution in another thread. He included the PADR in his solution but I had to do some modifications to some code that he gave me and I kinda forgot about the PADR part.
*******************************************************
Save a tree, eat a beaver.
Denis Chassé
Previous
Reply
Map
View

Click here to load this message in the networking platform