cwolgamott
Programmer
Hello.
I am trying to create a view using fields in a table. I need to pad spaces with zeros after the field. For example, if the field is: 1234 and the length of the field must be ten digits long, I need it to appear like this: 1234000000. I am able to pad zeros before the field by using:
RIGHT(REPLICATE('0',5) + CONVERT(VARCHAR,NewRead), 5)
(NewRead is the field name)
I must use the field name because not all of the values will be the same length. For example, one could be 1234 and another could be 12345. I would greatly appreciate any suggestions or help.
Thank you.
RIGHT(REPLICATE('0',5) + CONVERT(VARCHAR,NewRead), 5)
(NewRead is the field name)
I must use the field name because not all of the values will be the same length. For example, one could be 1234 and another could be 12345. I would greatly appreciate any suggestions or help.