Insert a NaN and fetch in Oracle 8.1.7 on Solaris 2.7

From: lei wang <leiwang_q_at_hotmail.com>
Date: 29 Jul 2002 08:31:07 -0700
Message-ID: <af074b9c.0207290731.56f10bcb_at_posting.google.com>


I have a business requirement that we have to insert NaN (Not a Number) into oracle db. I tried to use Oracle JDBC drivers (both OCI8 and Thin), but I always got 0...

    create table mytest (

       name varchar2(15),
       rate number);

In Java code:
       PreparedStatement ps = connection.prepareStatement("insert into
mytest(name, rate) values (?, ?)");
       ps.setString(1, "XYZ");
       ps.setDouble(2, Double.NaN);
       ps.execute();

I selected using SQLPLUS and JDBC, the value for rate is always 0.

When I use C++ and RougeWave SourcePro, NaN is inserted successfully. But SQL*Plus hangs when selecting, and C++/RougeWave gives -0.010101 when selecting.

Anyone has any info about NaN? Thanks.

  • lei
Received on Mon Jul 29 2002 - 17:31:07 CEST

Original text of this message