Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PADL() equivalent in SQL Server
Message
From
10/04/2003 10:19:50
 
 
To
10/04/2003 10:14:54
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00776019
Message ID:
00776038
Views:
25
>>Something like this?
>>
Select IsNull(Replicate(' ', 20 - len(SomeField))) + SomeField as SomeName from SomeTable
>
>I've been trying various combinations such as:
>
>
>SELECT IsNull(Replicate(' ',20-len(STR(MONTH(AddDate)))))+STR(MONTH(AddDate)) FROM News
>
>
>but, can't make anything work.

Ok, I'm getting close. The following returns the proper value but it returns it in a memo field:
SELECT REPLICATE('0',2-LEN(LTRIM(STR(MONTH(AddDate)))))+LTRIM(STR(MONTH(AddDate))) FROM News
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform