Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Like loading the zeros in SQL
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01119748
Message ID:
01119876
Views:
15
You're right as usual, I thought he was pulling the data from vfp. In that case
select STR(E.anomat,4)+'-'+RIGHT('0000'+LTRIM(STR(E.numest)),4) as matricula
should do it.



>There's no ALLTRIM() function in T-SQL.
>
>>
>>
>>select STR(E.anomat,4)+'-'+RIGHT('0000'+ALLTRIM(STR(E.numest)),4) as matricula
>>
>>
>>
>>>
select STR(E.anomat,4) + '-' + RIGHT('0000' + CAST(E.numest AS varchar(4)),4) as matricula
>>>>hi, how I can do so that in select SQL to be able to fill with zero from the left, in vfp is with the function right(), but SQL this does not work to me.
>>>>ej.
>>>>select STR(E.anomat,4)+'-'+RIGHT('0000'+RTRIM(STR(E.numest)),4) as matricula
>>>>the field registers must contain matricula=2005-0045, but 2005- 45
I'm a mixture of Albert Einstein and Arnold Schwarzenegger. The only trouble is that I got Einstein's body and Schwarzenegger's brain
Previous
Reply
Map
View

Click here to load this message in the networking platform