Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> ora-01722 invalid number

ora-01722 invalid number

From: Christian <luetke.entrup_at_gmx.de>
Date: Tue, 26 Aug 2003 13:06:28 +0200
Message-ID: <bifeqr$uv3$07$1@news.t-online.com>


Hello everybody,

hope anybody can help me.

I got the this invalid number exception when I tried to store a floating-point number with a comma as decimal separator in my Java-App.
My customer wishes to use German numeric character settings, which is a comma as decimal separator and '.' for the thousands. I know that I can chance the NLS_NUMERIC_CHARACTERS setting, but if I set it to '.,', which is exactly what I need, I can store the number with a comma, but when I retrieve the same number back from the DB, it is shown with a '.' instead of the comma, and the next try to store this number back fails with the exception above.

example:
a java textfield with the value '9,23' is saved in the Oracle-DB correctly. retrieving this value back into the same textfield appears as '9.23' saving again fails with ORA-01722 until I change the '.' back to comma.

I'm using Oracle 9.2.0.1.0
NLS_LANG-settings : GERMAN_GERMANY.WE8ISO8859P1 additional settings: NLS_DATE_FORMAT='DD.MM.YYYY'";

                              NLS_NUMERIC_CHARACTERS='.,'";

it seems to be strange that the NLS-setting for germany is not sufficient for my purposes, because
it's only the common german numeric setting I have to use. Maybe a bug in the Oracle-NLS??

thanks in advance
Chris Received on Tue Aug 26 2003 - 06:06:28 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US