Binary_float/double and NAN and Infinity and PL/SQL

Peter93

Member²
Hello,

I have updated a column as
update Table1 t set t.test2 = 0f/0 ;

When I read out from this table1 afterwards , I get an error in PL/SQL:

ORA-01722: Invalid number

Nothing is shown on screen.

I have expected to see NAN or Infinity instead of an error message for column TEST2.
 
Last edited:
We'll check it out.

As a test, can you go to Preferences > SQL Window and enable the "Number fields to_char" option?
 
Last edited:
Yes, that helps.
It shows now: "Inf" and "Nan"

But I think, for version 13, it would be better to see it, without this special configuration. I don't know other aspects of this special switch, when I make edits in number-fields.
 
When editing number fields with the "number fields to_char" option you need to use the number format as defined for your Oracle session, instead of the number format that is defined in Windows.

Instead of using this preference you can also explicitly use the "to_char" function in your SQL select statement for the columns where this NaN issue can occur.
 
Back
Top