Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NLS setting in sql developer to change the Number format

When i am trying to insert decimal value in KPI_FREQUENCY field which is Number datatype in oracle sql developer, its always inserting with ',' which is incorrect. I try to change NLS setting of decimal to '.' but still its inserting with','. I also tried to_char to insert the value with '.' but its not working.

Insert into RATOR_MONITORING_CONFIGURATION.KPI_DEFINITION 
  (KPI_DEF_ID,KPI_NAME,KPI_DESC,KPI_FREQUENCY) 
values 
  ('10003881','Backlog Resul11t','Backlog Result11', 0.5);
like image 224
Andrew Avatar asked Aug 20 '15 11:08

Andrew


People also ask

How do I change the number format in SQL Developer?

In SQL Developer, Preferences->Database-> NLS , if you change the Decimal Separator setting, you also need to make sure that your new setting doesn't conflict with the existing Group Separator setting.

What is NLS setting in Oracle?

Oracle's National Language Support (NLS) architecture allows you to store, process, and retrieve data in native languages. It ensures that database utilities and error messages, sort order, date, time, monetary, numeric, and calendar conventions automatically adapt to the native language and locale.

How do I change Toad settings in NLS?

You may go to Toad for Oracle > Database > Administer > NLS Parameters screen. If you have a DB Admin module, then and only then you will be able to modify the NLS parameter. If you don't have DB Admin module, you can setup a startup sql script which will be executed when the new connection is created.

Can we change NLS character set at session level?

You might want to modify the NLS environment dynamically during the session. To do so, you can use the ALTER SESSION statement to change NLS_LANGUAGE , NLS_TERRITORY , and other NLS parameters. Note: You cannot modify the setting for the client character set with the ALTER SESSION statement.


1 Answers

Moving my comment to an answer to make it official:

In SQL Developer, Preferences->Database-> NLS, if you change the Decimal Separator setting, you also need to make sure that your new setting doesn't conflict with the existing Group Separator setting.

In this case, you needed to change Decimal Separator to a period ., but also change the Group Separator setting from a period to a comma , to avoid a setting conflict.

like image 109
sstan Avatar answered Sep 17 '22 11:09

sstan