Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TSQL padleft
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01387814
Message ID:
01387823
Vues:
60
>>I need to padlef a string with zeros in TSQL, but I can't find the command.
>>42 -> 0042
>>
>>Any help would be appreciated.
>>
>>Thanks,
>>Einar
>
>
>SELECT RIGHT('0000'+CAST(42 as varchar(4)), 4)
>
Thanks. Makes a lot of sense.
Semper ubi sub ubi.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform