select * from tablename t where t.endtime>to_date('2008080100:00:00','yyyymmddhh24:mi:ss')上面这个语句错误提示为literal does not match format string能帮忙解答下哪里错了吗?谢谢!
解决方案 »
- oracle中遇到无法插入的汉字该怎么办
- 请问怎么将clob数据直接写到一个xml文件里面
- SQL脚本
- 关于存储过程的两个问题
- 再求一条sql语句:(再求)
- 我在linux下安装oracle的时候报cannot execute binary file这个错误什么原因啊
- 如何卸载Oracle9I
- 关于OracleOraHome81TNSListener的问题
- SqlServer里的exsits功能在oracle中怎么实现??急!!!
- Oracle管道函数—select into 单行子查询返回多行
- Oracle Berkeley DB的的3个版本都有什么区别啊。
- occi连接远端数据库,sqlplus语句可以,可代码咋不行呢?还请大家帮帮忙,谢谢。
2、如果转化 to_char(sysdate -7,'yyyymmddhh24:mi:ss')) 后插入到一个date字段则会报错。你的问题场景描述不清楚,可能性很多。
ORA-01861 literal does not match format stringCause: Literals in the input must be the same length as literals in the format string (with the exception of leading white space). If the "FX" modifier has been toggled on, the literal must match exactly, with no extra white space.Action: Correct the format string to match the literal.
to_date('2008-08-01 00:00:00','yyyy-mm-dd hh24:mi:ss')
可以用select sysdate from dual,查看一下日期的格式设置alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss'
如果不想查系统格式,不如两边都有to_char来的快。