Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在从表中选择行,但某些列是文本类型,但它们中始终包含数字数据。如何将它们格式化为数字?
例如列数量标题“数量”格式 999,999
但是,由于表中的列是文本,因此忽略了数字格式。
您将需要 TO_NUMBER 查询中的列。
要使用千位分隔符进行渲染,您需要...
to_char(to_number(quantity), '999,999')
谢谢史蒂夫,
我现在可以拥有:
列数量标题“数量”格式 999,999 从销售中选择 TO_NUMBER(quantity) 作为数量
我得到了一份正确合理的报告。