This one is pretty simple actually yet I wasn’t able to find anything useful.
In my SQL query I have some rounded numbers with a single scale value – round(number,1). If the numbers are rounded to some decimal digit it prints in the format ‘9,9’.
On the other hand if the numbers are rounded to an integer, only the integer value without the zero after comma is printed although I want my query to select the numbers in ‘9,9’ format even the decimal digit is zero.
In short, I think I need something like for example
to_char((select round(121.01,1), from dual), '*,1') ; to output 121,0.
What is the best way to do this? Thanks in advance
Korhan
All you have to do is specify the number of decimal points you want in your
to_char. The problem with using format masks is that you need to specify the number of numbers you want in front of your decimal point.There are a number of other formatting options.