Question : Pad imported text with trailing zeros

I'm importing some text from an excel spreadsheet and I need to make sure a certain field is 16 characters long. Sometimes, the excel spreadsheet only has 14 characters in it. In this case, I just need to pad the text with trailing zeros. How can I do this?

Answer : Pad imported text with trailing zeros

UPDATE SomeTable
SET SomeColumn = LEFT(SomeColumn + '0000000000000000', 16)
Random Solutions  
 
programming4us programming4us