oracle sql developer中的NLS设置以更改数字格式
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32117625/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
NLS setting in sql developer to change the Number format
提问by Andrew
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.
当我试图在 KPI_FREQUENCY 字段中插入十进制值时,它是 oracle sql 开发人员中的数字数据类型,它总是用“,”插入,这是不正确的。我尝试将十进制的 NLS 设置更改为“。” 但它仍然插入','。我也试过 to_char 用 '.' 插入值 但它不工作。
Insert into RATOR_MONITORING_CONFIGURATION.KPI_DEFINITION
(KPI_DEF_ID,KPI_NAME,KPI_DESC,KPI_FREQUENCY)
values
('10003881','Backlog Resul11t','Backlog Result11', 0.5);
回答by sstan
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.
在 SQL Developer 中Preferences->Database-> NLS
,如果更改Decimal Separator
设置,还需要确保新设置与现有Group Separator
设置不冲突。
In this case, you needed to change Decimal Separator
to a period .
, but alsochange the Group Separator
setting from a period to a comma ,
to avoid a setting conflict.
在这种情况下,您需要更改Decimal Separator
为句点.
,但也需要将Group Separator
设置从句点更改为逗号,
以避免设置冲突。