Sp. param_value nvarchar2 (200 );
Select sp. param_code, to_number (sp. param_value), sp. param_value, length (param_value)
From sys_service_param sp
Where sp. param_type_code = 'bank'
And sp. param_value = to_char (0.78, '0. 00 ')
Why does to_char fail?
Select sp. param_code, to_number (sp. param_value), sp. param_value, length (param_value)
From sys_service_param sp
Where sp. param_type_code = 'bank'
It is found that the param_value character length is 4 0.78 = 4
To_char format is five characters
SQL> select length (to_char (0.78, '0. 00'), to_char (0.78, '0. 00') from dual;
LENGTH (TO_CHAR (0.78, '0. 00') TO_CHAR (0.78, '0. 00 ')
------------------------------------------------
5 0.78
The format is 3 Characters
SQL> select length (to_char (0.78), to_char (0.78) from dual;
LENGTH (TO_CHAR (0.78) TO_CHAR (0.78)
----------------------------------
3. 78
No wonder you cannot find the data !!
SQL> select length ('0. 78 ') from dual;
LENGTH ('0. 78 ')
--------------
4
This is just a single quotation mark.
And sp. param_value = trim (to_char (0.78, '0. 00 ').