oracle学习笔记【 ORA-01861: literal does not match format string(字符串格式不匹配)】

来源:互联网 发布:江苏软件设计师 编辑:程序博客网 时间:2024/05/01 00:07


Oracle 异常 ORA-01861: literal does not match format string(字符串格式不匹配) 如果直接按照字符串方式,或者,直接使用'2007-12-28

10:07:24',没有指定日期格式,就会报错:ORA-01861: 文字与格式字符串不匹配
必须指定日期格式

 

正确做法:

 

SELECT D261 as ename,GENTIME,D267 FROM UNITE.UPR_C2_NE_VENDOR T

where T.GENTIME<to_date('2009-03-18 17:03:00' , 'yyyy-mm-dd hh24:mi:ss')

原创粉丝点击