如何格式花数字为字符串,0.22 格式话成字符 0.22,有正符号怎么办??正的不显示,负数显示-0.22
我写的,
amount := 0.11;
dbms_output.put_line(to_char(amount,'S9D99'));
还是不能得到正确答案??高手帮忙了,
---------------------------------------------------------------
SQL> select to_char(-9.22,'0D99') from dual;
TO_CH
-----
-9.22
SQL> select to_char(9.22,'0D99') from dual;
TO_CH
-----
9.22
---------------------------------------------------------------
to_char(amount,'90.99')
---------------------------------------------------------------
http://www.pgsqldb.org/pgsqldoc-cvs/functions-formatting.html
非常全的数据转换,可以看看