Hi Team,
I am looking for a logic for the below requirement I have.
I have a field called prod_no
If length of pros_no = 5 then I should add '000' to the left to make it 8 digit number
for example if prod_no = 12345 then result should be like 12345000
If length of prod_no = 4 then I should add 000 to the left and 0 to the right
for example if prod_no = 1234 then result should be like 01234000
If length of prod_no = 3 then I should add 000 to the left and 00 to the right
for example if prod_no = 123 then result should be like 00123000
If length of prod_no = 2 then I should add 000 to the left and 000 to the right
for example if prod_no = 12 then result should be like 00012000
If length of prod_no = 1 then I should add 000 to the left and 0000 to the right
for example if prod_no = 123 then result should be like 00001000
Appreciate if you can give formula for this problem.
Other questions is for same field prod_no I have Characters and alpha numeric characters in it. How I can filter those out.
for example prod_no = 0nanana000
H290478
Thanks
Kavya