Re: Upgrading Oracle ODBC 10.1.0.2.0
Date: Mon, 31 Dec 2007 07:29:16 -0800 (PST)
Message-ID: <e0ced7c5-de16-4904-8294-38b23d334204@d21g2000prf.googlegroups.com>
Comments embedded.
On Dec 31, 8:41 am, valigula <valig..._at_gmail.com> wrote:
> Upgrading a database from Oracle 9i to 10g.
> I have encountered a problem with the ODBC 10.1.0.2.0 driver, it
> transforms the 21 numeric digits from a PK column to a scientific
> format.
Which should be nothing more than a display issue. Try setting numwidth to a value greater than the largest exponent displayed:
SQL> select empno, ename, bizarre_num
2 from emp;
EMPNO ENAME BIZARRE_NUM
---------- ---------- -----------
7369 SMITH 4.3442E+10 7499 ALLEN 8.9976E+10 7521 WARD 7.0707E+10 7566 JONES 1.7030E+11 7654 MARTIN 7.3230E+10 7698 BLAKE 1.6889E+11 7782 CLARK 1.4837E+11 7788 SCOTT 1.8196E+11 7839 KING 3.0725E+11 7844 TURNER 9.2293E+10 7876 ADAMS 6.8235E+10 EMPNO ENAME BIZARRE_NUM ---------- ---------- ----------- 7900 JAMES 5.9290E+10 7902 FORD 1.8732E+11 7934 MILLER 8.1833E+10
14 rows selected.
The largest exponent displayed is 11, so set the numwidth to 12:
SQL> set numwidth 12
Run the query again:
SQL> /
EMPNO ENAME BIZARRE_NUM
------------ ---------- ------------
7369 SMITH 43441728800 7499 ALLEN 89976001600 7521 WARD 70706801250 7566 JONES 170301959100 7654 MARTIN 73229645000 7698 BLAKE 168888731400 7782 CLARK 148370833800 7788 SCOTT 181958832000 7839 KING 307249605000 7844 TURNER 92292504000 7876 ADAMS 68234513600 EMPNO ENAME BIZARRE_NUM ------------ ---------- ------------ 7900 JAMES 59289500000 7902 FORD 187324812000 7934 MILLER 81832862800
14 rows selected.
SQL> Exponential notation is gone, and the numeric values haven't changed as the display format doesn't change what is stored in the table.
> Has anyone found this problem?, is any other work around but changing
> the numer to varchar ?
>
> Thanks in advance
David Fitzjarrell Received on Mon Dec 31 2007 - 09:29:16 CST