Possible Duplicate:
Most efficient T-SQL way to pad a varchar on the left to a certain length?
I have the customer table where the customerID is of length:10 but there are few customer where the length is 3 or 5
ex:
3445
34
789
7800
but the output should be like the following, I need to prefix zero here if length is less than 10
0000003445
0000000034
0000000789
0000007800
Script to get this data is:
select customerID from customer