Home » SQL & PL/SQL » Client Tools » Oracle number format (Any)
Oracle number format [message #652120] Thu, 02 June 2016 04:10 Go to next message
pkapoor
Messages: 2
Registered: June 2016
Location: india
Junior Member
Hello,

I have a table with below details:
SQL> select * from TM_xxx;

COL2 TEST_ROW_ID
---------- -----------
9.4436E+14 1
1.6578E+24 2

Table description:
SQL> describe TM_xxx
Name Null? Type
----------------------------------------- -------- --------------------------

COL2 NUMBER(38)


How can i get data in column2 displayed as simple integer values and not exponential format
Re: Oracle number format [message #652121 is a reply to message #652120] Thu, 02 June 2016 04:19 Go to previous messageGo to next message
Littlefoot
Messages: 21234
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
There are a few options I can think of, such as
SQL> create table test (col number(38));

Table created.

SQL> insert into test values (56465464654654654654);

1 row created.

SQL> select * From test;

       COL
----------
5,6465E+19

SQL> column col format 999999999999999999999999999999999
SQL> select * From test;

                               COL
----------------------------------
              56465464654654654654

SQL> set numformat 9999999999999999999999999
SQL> select * From test;

                       COL
--------------------------
      56465464654654654654

SQL> set numwidth 25
SQL> select * From test;

                      COL
-------------------------
     56465464654654654654

Re: Oracle number format [message #652122 is a reply to message #652121] Thu, 02 June 2016 04:27 Go to previous messageGo to next message
cookiemonster
Messages: 12927
Registered: September 2008
Location: Rainy Manchester
Senior Member
Note this is all sqlplus specific
Re: Oracle number format [message #652123 is a reply to message #652120] Thu, 02 June 2016 04:34 Go to previous messageGo to next message
Littlefoot
Messages: 21234
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
This:

pkapoor

SQL> select * from TM_xxx;


suggests that OP is using SQL*Plus ./fa/3314/0/
Re: Oracle number format [message #652127 is a reply to message #652123] Thu, 02 June 2016 05:10 Go to previous messageGo to next message
cookiemonster
Messages: 12927
Registered: September 2008
Location: Rainy Manchester
Senior Member
I should have been clearer. I'm sure the OP is using sqlplus here. I just wanted to make sure he (and anyone else reading this) realised that the problem was solely due to sqlplus settings rather than anything to do with DB and could only be fixed by adjusting those settings. You already knew that.
Re: Oracle number format [message #652160 is a reply to message #652127] Thu, 02 June 2016 23:32 Go to previous message
pkapoor
Messages: 2
Registered: June 2016
Location: india
Junior Member
Thank you all for the reply.
Previous Topic: TNSNAMES not detected
Next Topic: Installing example Schemas v2...Help
Goto Forum:
  


Current Time: Mon Nov 20 09:08:55 CST 2017

Total time taken to generate the page: 0.03258 seconds