Converting Decimal type to Char type with leading zeros in Teradata

Consider a decimal column field 'salary' has the value 12345678910.

If you want to convert it into char type, you cannot cast directly.

First step : Decimal to Binary format
Second step: Binary to Char format


Decimal value: 12345678910


Direct casting which is giving undesirable output:

SEL CAST(salary AS CHAR(13)) 
FROM tbl_casting


Output: 12345678910. 


..

Correct casting which is giving desirable output:

SEL CAST(CAST(salary AS FORMAT'-9(13)') AS CHAR(13))  
FROM tbl_casting


Output: 0012345678910