I can't find a simple way to do this in T-SQL. I have for ... select right ('00'+ltrim(str( )),2 ) ...
stackoverflow.com