ORA-01846:not a valid day of the week .

转载于:http://blog.csdn.net/dreamingcoder259/article/details/6091737

 

 

执行语句

  select next_day('2010-12-11', 'TUESDAY') from dual

报错 ORA-01846:not a valid day of the week 

解决办法: 

alter session set nls_date_language = 'American'

 

alter session 只对当前会话生效;
alter system ......scope=spfile 修改spfile,重启后生效;
alter system ......scope=memory修改当前的实例,不修改spfile,重启后失效;
alter system ......scope=both(默认) 当前实例生效且修改spfile。

 

 

 

 

nls_date_language , SERVER端的日期类型的lang,比如中文的时候,显示“星期一”,英文时,显示MONDAY。 官方解释: NLS_DATE_LANGUAGE specifies the language to use for the spelling of day and month names
and date abbreviations (a.m., p.m., AD, BC) returned by the TO_DATE and TO_CHAR functions. NLS_LANGUAGE specifies the default language of the database. This language is used for messages,
day and month names, symbols for AD, BC, a.m., and p.m., and the default sorting mechanism.
This parameter also determines the default values of the parameters NLS_DATE_LANGUAGE and NLS_SORT.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值