0
我有这样的查询:在此Oracle查询中使用to_date有什么问题?
INSERT INTO some_table (date1, date2)
VALUES (to_date('2012-10-24','YYYY-MM-DD'), to_date('2012-10-24','YYYY-MM-DD'));
,但我得到:
SQL Error: ORA-01858: a non-numeric character was found where a numeric was expected
01858. 00000 - "a non-numeric character was found where a numeric was expected"
和:
*Cause: The input data to be converted using a date format model was
incorrect. The input data did not contain a number where a number was
required by the format model.
*Action: Fix the input data or the date format model to make sure the
elements match in number and type. Then retry the operation.
,但我的to_date
使用似乎还好吗?
非常感谢。
这应该是工作,看到这个[演示](http://sqlfiddle.com/#!4/e75a8/1)。这是您尝试运行的唯一查询吗? 'date1'和'date2'的数据类型是什么? – Taryn