Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Toad truncating/rounding large Oracle numbers?

We have a table with a 'price' field of type NUMBER(20,7).. In TOAD I do this:

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.

??

like image 961
Marcus Leon Avatar asked Aug 03 '10 20:08

Marcus Leon


People also ask

How do I show large numbers on toad?

If you run your queries with F9 (or click the “execute/compile statement at caret” button), then this is controlled in Toad's main options window: Options -> Data Grids -> Data -> Display Numbers in Scientific notation. If you get any results with #'s instead of digits, you can add more 9's above.

How do I change the number format in Toad?

open the options window. along the left, go to Data Grids -> Data. along the left, go to General. now the decimal/thousands values are not blank and you can set them.


1 Answers

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.

like image 122
René Nyffenegger Avatar answered Sep 18 '22 12:09

René Nyffenegger