How to Set Numwidth in The Grid Output of Pl/Sql Developer

How to set numwidth in the grid output of PL/SQL developer?

Turns out this is possible!!!

Tools -> Preferences -> SQL Window ->
Number fields to_char

How do I convince Oracle SQL Developer to show number in scientific notation?

From the documentation:

to_char(<your number column>, '9.9EEEE')

In SQL Developer 4:

SQL Developer window

I can't see any way to apply a model globally, as suggested by the accepted answer from the question you linked to - the current version of SQL Developer doesn't seem to have 'SQL Window' section under preferences like PL/SQL Developer does. But you probably don't want to apply the model to every number in every result set anyway.

selecting more than 16 digits result in wrong values

SQLPLUS

Use SET NUMWIDTH, example from sqlplus command line:

SQL> SHOW NUMWIDTH
numwidth 10
SQL> select 12345678901213 from dual;

12345678901213
--------------
1,2346E+13

SQL> SET NUMWIDTH 20
SQL> select 12345678901213 from dual;

12345678901213
--------------------
12345678901213

PL/SQL

Cast the value to the correct datatype, example (from sqlplus):

SQL> set serveroutput on
SQL> DECLARE
2 my_number NUMBER;
3 BEGIN
4 select 12345678901213 into my_number from dual;
5 dbms_output.put_line('Number:'|| my_number);
6 END;
7 /
Number:12345678901213

PL/SQL Developer Test Window for Stored Procedure turns number value into scientific notation

Oh another thing you can try to do to view the full value in the Test Window of PL/SQL Developer is to switch the type from "float" to "string"

Ugly formatting in SQL*Plus

Increase the linesize, e.g SET LINESIZE 32000

or use SET WRAP OFF (but this will truncate long values)



Related Topics



Leave a reply



Submit