Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Add prefix '0' to the column value
Message
De
30/09/2017 23:46:15
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01654668
Message ID:
01654699
Vues:
54
>
>How do I do it in T-SQL in one UPDATE?
>
>TIA


There might be more recent ways to do this, but here's how I always do it...
UPDATE TestTable SET TestColumn = RIGHT('0000' + TestColumn,4)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform