Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Decimal separator in Oracle

900 views
Skip to first unread message

curious

unread,
Oct 30, 2001, 5:37:55 AM10/30/01
to
Need a help, please.

I have installed Oracle8i on Windows NT 4 (Service Pack 4) server and
created a database on it with default settings (by default it was
created with CL8ISO8859P5 ISO 8859-5 Latin/Cyrillic character set).
In this database I have created a table SCOTT.NAD with two fields:
id10_0 -> NUMBER(10,0)
id10_5 -> NUMBER(10,0) and filled with the following values:

id10_0 id10_5
--------------
0 0.5
1 1.5
2 2.5

When I used SQL "SELECT * FROM SCOTT.NAD" in SQL+ on the server the
results shown were the same as above.

Then I go to Windows NT Workstation (Russian edition, Service Pack 4 -
in Russian the default decimal separator is "," - comma) and use the
same SQL statment in SQL+ the results are following:

id10_0 id10_5
--------------
0 0,5
1 1,5
2 2,5

and this result doesn't depend on what is the value of decimal
separator ("," - comma or ".' - point) which is set through Control
Panel -> International Settings -> Numbers.

This is very strange and doesn't allow to work with database through
ODBC driver
because it generates ORA-01722 error.

Iustin Amihaesei

unread,
Oct 31, 2001, 8:12:05 AM10/31/01
to
Hi.
I don't know if I can help you but I think your problem is an oracle
parameter named : NLS_NUMERIC_CHARACTERS, which I think is session
specific; it contains the separators for numeric values. You can also
set it into registry:
HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/HOME0 - or whatever home you have -
key: "NLS_NUMERIC_CHARACTERS = .," for example.

Hope this helps,
Iustin Amihaesei

gil...@mail.ru (curious) wrote in message news:<84b1a83c.01103...@posting.google.com>...

curious

unread,
Nov 1, 2001, 4:11:31 AM11/1/01
to
aiu...@thinvest.ro (Iustin Amihaesei) wrote in message news:<c0f47435.01103...@posting.google.com>...

>
> I don't know if I can help you but I think your problem is an oracle
> parameter named : NLS_NUMERIC_CHARACTERS, which I think is session
> specific; it contains the separators for numeric values. You can also
> set it into registry:
> HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/HOME0 - or whatever home you have -
> key: "NLS_NUMERIC_CHARACTERS = .," for example.
>
> Hope this helps,
> Iustin Amihaesei

Thanks for help.

Inserting NLS_NUMERIC_CHARACTERS into registry had no effect -
decimal separator stayed ",". I have looked in Oracle documentation
and this registry key is not mentioned. So are sure this registry key
is used and where I can read about it?
I have changed NLS_LANG from RUSSIAN_CIS.CL8MSWIN1251 to
AMERICAN_AMERICA.US7ASCII and that solved the problem - decimal
separator became "." but of course character strings are not cyrilic
so this is not a solution.

Iustin Amihaesei

unread,
Nov 2, 2001, 6:42:03 AM11/2/01
to
Hi
I don't know why inserting this key in the registry didn't work for
u, as I've used it and it worked fine. Anyway, I don't know where it's
documented, if it's documented, as somebody told me this too. The
reference is in Oracle documentation : Oracle reference. They say it's
session specific so u can set it with alter session ( this wasn't a
solution for me so I've used the registry key ). Btw, this registry
setting is per client ( on the client system - not on server ) as it
affects only the session loged in from that client.

The form is: NLS_NUMERIC_CHARACTERS =
"<decimal_character><group_separator>"

I'm sorry I realy don't know anything more about this settings. It
seemed to me that all session parameters could be set into registry so
u don't have to alter it with alter session.
Hope you'll solve it,
Iustin Amihaesei

gil...@mail.ru (curious) wrote in message news:<84b1a83c.01110...@posting.google.com>...

0 new messages