Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

tsql pad left

declare @T table(id int)
insert into @T values
(1),
(2),
(12),
(123),
(1234)

select right('0000'+convert(varchar(4), id), 4)
from @T
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #tsql #pad #left
ADD COMMENT
Topic
Name
8+6 =