Oracle错误消息输入值不够长 [英] Oracle error message input value not long enough
问题描述
我需要以下查询的帮助.我收到一条错误消息:
I need help with the below query. I am getting an error message :
错误:从游标获取错误. ORACLE 错误是 ORA-01840 :输入 值不足以容纳日期格式.
ERROR: Error fetching from cursor. ORACLE error is ORA-01840: input value not long enough for date format.
这是指什么不是日期格式的输入值?我不知道这一点.我确实看到它指的是AND Removed>= TO_DATE('08162011', 'MMDDYYYY')
.
What input value is this referring to not being in date format? I can't figure this out. I do see where it refers to AND Removed>= TO_DATE('08162011', 'MMDDYYYY')
.
Removed
推荐答案
-
可能您有一个类似
TO_DATE('0816', 'MMDDYYYY')
的值TR_EFF_DT
输入,并且与日期不符 格式,如以下语句所示:Probably you have a value like
TO_DATE('0816', 'MMDDYYYY')
forTR_EFF_DT
input, and that does not fit with respect to the date format, as in the following statement :with tab(TR_EFF_DT) as ( select TO_DATE('0816', 'MMDDYYYY') from dual ) select * from tab where TR_EFF_DT>= TO_DATE('08162011', 'MMDDYYYY'); Error: ORA-01861: literal does not match format string
-
OR ,您的数据库服务器的 Date Format 与当前会话的 Date Format 可能不匹配.在这种情况下 可能会发出:
OR you probably have a mismatch for your DB server's Date Format with your current session's Date Format. In this case you may issue :
ALTER SESSION SET nls_date_format='MMDDYYYY';
这篇关于Oracle错误消息输入值不够长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!