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
내 사용이 좋아 보인다?
감사합니다.
이것이 작동해야합니다. [demo] (http://sqlfiddle.com/#!4/e75a8/1)를 참조하십시오. 이 쿼리가 실행하려고하는 유일한 쿼리입니까? 'date1'과'date2'의 데이터 타입은 무엇입니까? – Taryn