I need to add minutes coming from an integer column with a timestamp to compare to another column.
Here's an example:
SELECT t1.id_liame, t1.id_table, t1.periodicidade , t3.data_extracao,
CASE WHEN(NOW() < (e.data_extracao + INTERVAL t1.periodicidade || '
MINUTES'))
THEN 'yes' ELSE 'no' END
FROM table1 as t1 LEFT JOIN liame_has_extracao as t2 USING(id_liame)
LEFT JOIN extracao as t3 USING(id_extracao)
l.periodicidade
is integer (minutes)
I need to verify if data_extracao(timestamp)
is greater then NOW() + l.periodicidade(integer - minutes)
.
How can i do it?
e.data_extracao
<-->extracao as t3
– Erwin Brandstetter Jul 2 '12 at 16:24