Toad 截断/舍入大 Oracle 数字?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3400393/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Toad truncating/rounding large Oracle numbers?
提问by Marcus Leon
We have a table with a 'price' field of type NUMBER(20,7)
.. In TOAD I do this:
我们有一个表的“价格”字段类型为NUMBER(20,7)
.. 在 TOAD 中,我这样做:
update mytable set price = 1234567890123.1234567;
Then I do this select:
然后我做这个选择:
select price, to_char(price) from mytable
PRICE TO_CHAR(PRICE)
1234567890123.12 "1234567890123.1234567"
Question is, why does TOAD truncate the result when displaying the NUMBER(20,7) field? The data is obviously there as it prints out with to_char.
问题是,为什么 TOAD 在显示 NUMBER(20,7) 字段时会截断结果?数据显然在那里,因为它用 to_char 打印出来。
??
??
回答by René Nyffenegger
Toad limits numbers in the data grid to 15 digits. I believe this is because excel limits numbers to 15 digits as well (or used to limit them). You can turn on "scientific notation" in options -> data grids -> data, check box Display large numbers in scientific notation. That won't probably help, either.
Toad 将数据网格中的数字限制为 15 位。我相信这是因为 excel 也将数字限制为 15 位(或用于限制它们)。您可以在选项 -> 数据网格 -> 数据中打开“科学记数法”,复选框以科学记数法显示大数。这可能也无济于事。
回答by Tim
->Right clickon the data grid
->Right click在数据网格上
->Select "Grid Options...
"
->选择“ Grid Options...
”
->Under "Data Grids
" chose "Data
"
->在“ Data Grids
”下选择了“ Data
”
->Uncheck "Display large numbers in Scientific Notation
"
->取消选中“ Display large numbers in Scientific Notation
”
After doing these you need to close and open TOAD
again. This worked for me in TOAD Version 8.6.0.38
完成这些后,您需要关闭并TOAD
再次打开。这对我有用TOAD Version 8.6.0.38
回答by Marwan ?????
I had a similar problem, Toad was truncating/rounding my numbers when being displayed in grid view.
我有一个类似的问题,Toad 在网格视图中显示时正在截断/四舍五入我的数字。
I found out that by using the Execute Statementbutton or by pressing F9to run the query then the truncation/rounding would not be performed.
我发现通过使用“执行语句”按钮或按F9来运行查询,则不会执行截断/舍入。
I hope that helps.
我希望这有帮助。