I am new to Teradata, so please ignore my lack of knowledge. Any help would be greatly appreciated. I have char(10) field in a table, which holds a number. This number in most cases is 10 character long but not in all cases. So in case if the number is less than 10 characters(for example 000123456), I want to be able to convert it by adding a leading zero to it. I am doing something like following, but it is not converting correctly. I am doing the select to have the data exported in a file as fast export.
select cast(col1 as integer) (format '9(10)') from tablex