sql server - SQL Getting 2 digit numbers from row_number Over () function -


is possible numbers 2 digits using following function?

row_number () over(order uh.stuff) hsn 

i want query return 01 , 02 , 03 instead of 1,2,3...

do this:

right('0' + convert(varchar,row_number() on (order uh.stuff)), 2) hsn 

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -