select right('000000'+CONVERT(varchar(6),100),6)
SELECT CallNo, RIGHT('000000'+CAST(CallNo AS VARCHAR(6)),6) as CallNumber from YourTable
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)