I have a case to convert the numbers to character.
But the 0 are missing when i try to convert them to char. So i tried to convert with the following method.
select rtrim(to_char(0.5, 'FM90.099'), '.') from dual;
But this doesnt work with 00.500. 00.500 also comes as 0.50 and 110.50 comes as #######. to make this case work i need to change this as to_char(110.50,'FM990.099). but again it wont work if there is a 4 digit number. I am also not sure how many digits can the production system have. is there any other to convert number to char with which the 0's doesnt miss.
Put in sufficient leading and trailing
9s to account for your maximum precision and scale. If the format mask is not big enough then increase the number of9s until it is.Which, for the sample data:
Outputs:
db<>fiddle here