2017-03-13 3 views
2

Wie kann ich diese MySQL-Anweisung in einem IBM Informix ausführen?Informix datetime: So subtrahieren Sie 15 Minuten

select type, channel, teilnr, starttime, endtime, usedtime, host 
from online_time 
where starttime < DATE_SUB(NOW(),INTERVAL 15 MINUTE) 
order by starttime desc 

Ich habe dieses in Informix versucht, aber es gab einen Syntaxfehler.

select type, channel, teilnr, starttime, endtime, usedtime, host 
from online_time 
where starttime < subdate(CURRENT, INTERVAL "15" MINUTES) 
order by starttime desc 
+0

Cross-Site-Duplikat: http://dba.stackexchange.com/questions/167017/informix-older-than-15-minutes/167043#167043 –

Antwort

3
select type, channel, teilnr, starttime, endtime, usedtime, host 
from online_time 
where starttime > (CURRENT - 15 UNITS MINUTE) 
order by starttime desc