问题
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