I want to convert a string to a number with one decimal place. Ex:
- 4 after conversion -> 4.0
- 4.1 after conversion -> 4.1
- 04.1 after conversion -> 4.1
- 04.0 after conversion -> 4.0
I have tried
SELECT TO_NUMBER('04.0','99.99') FROM dual;
But it will not convert the string to decimal number. instead it convert to a integer (4).