【发布时间】:2014-11-09 09:17:36
【问题描述】:
我无法将数字转换为字符串。例如下面是查询:
select to_char(50000.00,'999D99S')
任何帮助将不胜感激。
【问题讨论】:
标签: postgresql numeric postgresql-9.2
我无法将数字转换为字符串。例如下面是查询:
select to_char(50000.00,'999D99S')
任何帮助将不胜感激。
【问题讨论】:
标签: postgresql numeric postgresql-9.2
你必须添加更多9:
select to_char(50000.00,'99 999D99S');
如果您不知道可以有多少小数,请执行以下操作:
select to_char(50000.00,'999 999 999 999D99S');
【讨论】:
以下语法帮助了我:
select 50000.00::text as content
【讨论】: