select a from t where b = '0' and to_date(c,'yyyy-mm-dd HH24:MI:SS') >= to_date('2016-01-05 00:00:00','yyyy-mm-dd HH24:MI:SS') and d = '9' order by e desc
執行出錯,我上網查了下,改成了
select a from t where b = '0' and values to_date(c,'yyyy-mm-dd HH24:MI:SS') >=values to_date('2016-01-05 00:00:00','yyyy-mm-dd HH24:MI:SS') and d = '9' order by e desc
還是報錯,求大神指點。
剛剛直接select a from t where to_date(c,'yyyy-mm-dd HH24:MI:SS') >= to_date('2016-01-05 00:00:00','yyyy-mm-dd HH24:MI:SS')還是錯誤的
問題已解決。。。正確格式是:
(values to_date(c,'yyyy-mm-dd HH24:MI:SS') )>= (values to_date('2016-01-05 00:00:00','yyyy-mm-dd HH24:MI:SS'))