|
最初由 peak_weng 发布
[B]SQL>select dte,tim from sos where to_date(sysdate,'YYYY-mm-dd hh24:mi;SS')<to_date(dte||tim,'YYYY-mm-dd hh24:mi;SS')
如果这样写的话系统提示错误如下:
ORA-01861: 文字与格式字符串不匹配 [/B]
select dte,tim from sos where sysdate<to_date(dte||tim,'YYYY-mm-dd hh24:mi:SS')
都是写程序的,为什么就这么……
1: sysdate 不用转换,已经是日期类型了
2: 逗号 和 分号,中文分号 和 英文分号,怎么连续犯错误而不自知? |
|