I'm trying trying to zero-pad an integer column to a set length. This seems like it should be easy, but the results I'm getting aren't useful and I'm not sure why.QUERY:select coupID,'00000'+convert(char,coupID),right('00000'+convert(char,coupID),5)from houseCoupons
RESULT:1,'000001',''
I don't get why the third column is blank. The function seems to recognize the first parameter as valid character data - there are no errors. But I'm not getting the right-hand 5 characters of the expression...