Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to ensure the column length is big enough
Message
 
 
To
24/02/2003 08:55:20
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
00756936
Message ID:
00756939
Views:
10
This message has been marked as the solution to the initial question of the thread.
Mark,

You can use CAST() or CONVERT function.
CAST( LEFT(RTRIM(sect_desc),25)+" / "+
  LEFT(RTRIM(head_desc),20)+" / "+
  LEFT(RTRIM(item_desc),20) AS char(80))as Myfield
>When creating a view in Sql Server how do I ensure the length of a field returned is kept to a specific zize
>
>In Visual Foxpro I would do this
>SELECT PADR(LEFT(ALLTRIM(sect_desc),25)+" / "+LEFT(ALLTRIM(head_desc),20)+" / "+LEFT(ALLTRIM(item_desc),20)as Myfield
>
>
>But I can not find the equivelant of the PADR() command.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform