SQL ORA-01830: 日期格式图片在转换整个输入字符串之前结束
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/595072/
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
ORA-01830: date format picture ends before converting entire input string
提问by TJR
The SQL works fine on most installations. However I'm having a problem with an Oracle installation in Canada (possible date localization issue?).
SQL 在大多数安装中都能正常工作。但是,我在加拿大安装 Oracle 时遇到问题(可能是日期本地化问题?)。
http://www.google.com/search?q=ORA-01830
http://www.google.com/search?q=ORA-01830
I'm feeding data to a proprietary processor that generates the SQL. I only provide data. I was hoping for information that may help me solve it without involving support from the processor.
我正在将数据提供给生成 SQL 的专有处理器。我只提供数据。我希望在不涉及处理器支持的情况下提供可以帮助我解决问题的信息。
回答by David Aldridge
Do not rely on implicit date conversions.
不要依赖隐式日期转换。
Code like:
代码如:
MY_TABLE.MY_DATE_COLUMN >= '03/07/2008'
is bad practice. Use either:
是不好的做法。使用:
MY_TABLE.MY_DATE_COLUMN >= to_date('03/07/2008','mm/dd/yyyy')
or
或者
MY_TABLE.MY_DATE_COLUMN >= date '2008-03-07'