matrix_aash
asked on
How to Padd zero's on the left side of the column
Hi,
I have the following table
autokey branch_number
1 24
2 056
3 23
4 2
5 566
6 666
7 1
8 22
As you can see the branch_number column contains 2 digits,1 digit and 3 digitis numbers. I need to pad the two and one digit values with zero padded to the left so that all the values in branch_number column are 3 digits.
Can somebody please help me on this?
Thanks,
Aash.
I have the following table
autokey branch_number
1 24
2 056
3 23
4 2
5 566
6 666
7 1
8 22
As you can see the branch_number column contains 2 digits,1 digit and 3 digitis numbers. I need to pad the two and one digit values with zero padded to the left so that all the values in branch_number column are 3 digits.
Can somebody please help me on this?
Thanks,
Aash.
ASKER
Did not work mate
So what did you get?
ASKER
same values as they are in the table(column branch_number)
I need the branch_number column to look as below:
autokey branch_number
1 024
2 056
3 023
4 002
5 566
6 666
7 001
8 022
hope this helps.
Aash.
I need the branch_number column to look as below:
autokey branch_number
1 024
2 056
3 023
4 002
5 566
6 666
7 001
8 022
hope this helps.
Aash.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
the datatype is nvarchar. it does not have preceeding spaces it just have 2 digit and 1 digits number and also 3 digits. I want to make it 3 digits so that its uniform.
Should do it.