ORA-01830: date format picture ends before converting entire input string

南笙酒味 提交于 2019-12-03 01:21:59

问题


The SQL works fine on most installations. However I'm having a problem with an Oracle installation in Canada (possible date localization issue?).

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.


回答1:


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'


来源:https://stackoverflow.com/questions/595072/ora-01830-date-format-picture-ends-before-converting-entire-input-string

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!