Friday, May 9, 2008

rpad or right pad in sql-server

set @kcoo=right(replicate('0',3)+ cast(rtrim(@kcoo) as varchar),5)

No comments: