PadLeft function in T-SQL
I believe this may be what your looking for: or I haven’t tested the syntax on the 2nd example. I’m not sure if that works 100% – it may require some tweaking – but it conveys the general idea of how to obtain your desired output. EDIT To address concerns listed in the comments… @pkr298 … Read more