SQLServer中的Datediff移植到ORACLE計算有誤怎麼解決?


解決方法:

select trunc(sysdate) - trunc(to_date('2006-05-28 10:20','YYYY-MM-DD HH24:MI')) from dual


select * from 監控溫度表 A where 時間 between '" + Str(dtStart.Value) + "'AND '" + Str(dtEnd.Value) + "' And Not Exists (Select 時間 From 監控溫度表 Where DateDiff(mi, 時間, A.時間) <= " + Str(text1.text) + ") order by id

try

select * from 監控溫度表 A where 時間 between '" + Str(dtStart.Value) + "'AND '" + Str(dtEnd.Value) + "' And Not Exists (Select 時間 From 監控溫度表 Where DateDiff(mi, 時間, A.時間) <=5 ) order by id
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章