正如标题所说,我想找到一种方法,通过查询检查我的哪些数据集是过去6个月从 SYSDATE。
SELECT * FROM OrderArchive
WHERE OrderDate <= '31 Dec 2014';
我尝试了以下方法,但它返回一个错误,说我的日期格式是错误的。但是,插入数据时我使用了日期格式,没有任何问题。
命令行错误: 10列: 25
引用
错误报告-
SQL 错误: ORA-01861: 文字与格式字符串不匹配 01861.00000-“文字不匹配格式字符串”
* 原因: 输入中的文字长度必须与 格式字符串(前导空格除外) “ FX”修饰符已打开,文字必须完全匹配, 没有额外的空格。
操作: 更正格式字符串以匹配文字。