Home » SQL & PL/SQL » Client Tools » NUMBER datatype (Oracle Database 11g )
NUMBER datatype [message #612304] Tue, 15 April 2014 21:02 Go to next message
Dave L.
Messages: 8
Registered: February 2004
Junior Member
Created a table column defined as NUMBER(14,3) and added a value of 88888888.222 yet it only wants to display 88888888.2 when selected. Should I not get the whole thing? Also created it without the precision and scale and still get the 88888888.2
Re: NUMBER datatype [message #612305 is a reply to message #612304] Tue, 15 April 2014 21:09 Go to previous messageGo to next message
BlackSwan
Messages: 23059
Registered: January 2009
Senior Member
Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/ and please read http://www.orafaq.com/forum/t/174502/102589/

do NOT tell us, SHOW us.
Re: NUMBER datatype [message #612306 is a reply to message #612305] Tue, 15 April 2014 21:20 Go to previous messageGo to next message
Dave L.
Messages: 8
Registered: February 2004
Junior Member

As per your request:

SQL+adm1dvl:EMP1_A:PRIME> desc tempit

...
JOJO NUMBER(14,3)
JOJO2 NUMBER

SQL+adm1dvl:EMP1_A:PRIME> l
1 update tempit
2 set jojo=88888888.223,
3* jojo2=88888888.223
SQL+adm1dvl:EMP1_A:PRIME> /

233 rows updated.

SQL+adm1dvl:EMP1_A:PRIME> select unique jojo,jojo2 from tempit;

JOJO JOJO2
---------- ----------
88888888.2 88888888.2

Expect to see: 88888888.223 for both.
Re: NUMBER datatype [message #612307 is a reply to message #612306] Tue, 15 April 2014 21:31 Go to previous messageGo to next message
BlackSwan
Messages: 23059
Registered: January 2009
Senior Member
data presentation error; not data storage problem

SQL> @digits
SQL> CREATE TABLE TEMPNUM (
  2  NUM1 NUMBER,
  3  NUM2 NUMBER(14,3));

Table created.

SQL> INSERT INTO TEMPNUM VALUES(88888888.223,88888888.223);

1 row created.

SQL> SELECT * FROM TEMPNUM;

      NUM1       NUM2
---------- ----------
88888888.2 88888888.2

SQL> column num1 format  9999999999.999
SQL> /

           NUM1       NUM2
--------------- ----------
   88888888.223 88888888.2

SQL> 


Re: NUMBER datatype [message #612309 is a reply to message #612307] Tue, 15 April 2014 21:45 Go to previous messageGo to next message
Dave L.
Messages: 8
Registered: February 2004
Junior Member
Thanks.
Re: NUMBER datatype [message #612318 is a reply to message #612309] Wed, 16 April 2014 00:55 Go to previous message
Michel Cadot
Messages: 59794
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Or:
SQL> select * from TEMPNUM;
      NUM1       NUM2
---------- ----------
88888888.2 88888888.2

1 row selected.

SQL> set numwidth 15
SQL> /
           NUM1            NUM2
--------------- ---------------
   88888888.223    88888888.223

1 row selected.

Previous Topic: Toad
Next Topic: How to save time format to 24 hour while importing data from xls file
Goto Forum:
  


Current Time: Thu Nov 27 00:10:11 CST 2014

Total time taken to generate the page: 0.49091 seconds