分页: 1 / 1

Libreoffice Base查询输出小数点位数的问题

发表于 : 2018-03-12 14:06
百草谷居士
在使用Base执行select 查询输出时,发现运算的结果总是保留两位小数,而我希望保留四位小数。
比如两个numeric(14,4)的类型相除,我想象结果应该是4位小数,但是只有2位。按照一般的道理两个数运算保留小数时按小数位数最多的保留。

即便都是double类型的也是两位小数。

Re: Libreoffice Base查询输出小数点位数的问题

发表于 : 2018-03-12 15:21
poloshiao
看看 這一篇 有沒有幫助
https://help.libreoffice.org/Calc/Forma ... h_Decimals
Only the display in the document will be rounded off; internally, the number retains all four decimal places after the decimal point.

Re: Libreoffice Base查询输出小数点位数的问题

发表于 : 2018-03-13 9:30
百草谷居士
谢谢,这个是讲如何调整电子表格中的数字显示格式的。我需要的是数据库中查询输出位数。

Re: Libreoffice Base查询输出小数点位数的问题

发表于 : 2018-03-13 9:40
poloshiao
我需要的是数据库中查询输出位数。
https://help.libreoffice.org/Calc/Forma ... h_Decimals
Only the display in the document will be rounded off; internally, the number retains all four decimal places after the decimal point.

上面的摘錄是說
只有顯示在螢幕上或列印出來的 預設是 小數點 2 位數
儲存在電腦檔案內的 預設 都是 小數點 4 位數
(還需查询嗎 ? )

上面所附的網頁 是說明如何更改 在螢幕上或列印出來的 小數點 位數

Re: Libreoffice Base查询输出小数点位数的问题

发表于 : 2018-03-13 12:10
百草谷居士
本质上,这是两个软件,一个是calc,一个是base。上面只是说,修改单元格的格式不会影响单元格内存储的数据的本来值。