Boopathi
Boopathi

Reputation: 15

Oracle spool format issue

I am using oracle spool to export the oracle table data to excel file and it contain the 15 digit number but it displayed like below instead of 981239712396123

9.81239E+18

How to display the text only with 15 characters length and not with exponential values?

Upvotes: 0

Views: 2389

Answers (1)

Boneist
Boneist

Reputation: 23578

You need to set the numwidth setting in your script to the correct width in order to display your number in non-scientific notation. Here's a short demonstration for you:

SQL> set numwidth 7
SQL> select 12345678 from dual;

12345678
--------
 1.2E+07

SQL> set numwidth 8
SQL> /

12345678
--------
12345678

Alternatively, you can format individual columns and that will override the numwidth setting, e.g.:

SQL> set numwidth 7
SQL> col col1 format 999999999
SQL> select 12345678 col1 from dual;

      COL1
----------
  12345678

Upvotes: 1

Related Questions