Adding Leading zeros - TSQL

The way to add 0 (zeros) to the left hand side of your number in T-SQL by

replace(space(2-len(co_num))+rtrim(convert(char(2), co_num)),' ','0') ,

where co_num is numeric data type

Comments

Popular posts from this blog

ASP.NET Page Life Cycle

Network Intrusion Detection using Supervised ML technique

Support for .NET v4 / v4.5 and v4.5.1