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 -> Re: Decimal point and decimal comma

Re: Decimal point and decimal comma

From: Sybrand Bakker <gooiditweg_at_sybrandb.verwijderdit.demon.nl>
Date: Fri, 16 Jul 2004 20:17:38 +0200
Message-ID: <ij6gf057qqnjt9tirau900l8qnbp3uk4pt@4ax.com>


On Fri, 16 Jul 2004 18:22:04 +0200, Stefan Nobis <stefan_at_snobis.de> wrote:

>gelewyc_at_nyct.com (george lewycky) writes:
>
>> Two methods:
>
>Thanks for your tipps, but they don't seem to work (as expected).
>
>I have a simple table like this:
>
>id - integer
>x - number(5,2)
>y - float
>
>with this content:
>
>id x y
>1 1.2 1.2
>
>With a very simple VB6 application i connect to the database via
>RDO/ODBC and the Oracle 9 ODBC driver and i tested with SQL+. The
>server is running on the same machine. My locale settings are for
>germany (so decimal separator is ',' and the thousands separator
>is '.').
>
>I also tried to switch locale to English(USA).
>
>In every case i got from SQL+ "1,2" as answer and in Visual Basic
>i got "12" for x and for y "1,2" (germany) and "1.2" (english).
>
>I'm a bit curious why with both locale settings VB6/RDO gives me
>"12" as answer (i tried double and variant as VB datatypes).
>
>With the Microsoft ODBC driver for Oracle everything works fine (i
>get for the Oracle datatype number and float correct answers with
>the decimal separator from the current locale settings). So i
>assume there must be some possibility to get the same results with
>the Oracle driver (which is needed for ODBC level 3).
>
>BTW: Are there big differences between NUMBER(5,2) and FLOAT
>(performance/space)?

Apparently one driver doesn't pick up the correct NLS settings. (BTW: there is no such thing as 'german' or 'american' oracle, it just means you have changed parameters.
Could you run select * from nls_session_parameters and check nls_territory and nls_numeric_characters? The territory should be Germany. Note: if you have a default setup, and you change the windows locale, this changes your NLS settings as well!

--
Sybrand Bakker, Senior Oracle DBA
Received on Fri Jul 16 2004 - 13:17:38 CDT

Original text of this message

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