Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Oracle SQL Help
Hi
Whats the SQL syntax to gather records based on a date-time filed, where the field's value is within the last 60 minutes?
I can get the info based on 12am today using this statement -- but the last 60 minutes is far more helpful.
SELECT FIELD_1, COUNT(FIELD_1)
FROM TABLE_1
WHERE FIELD_2 = 1345
AND TO_CHAR(CREATED_DTM,'MM/DD/YYYY') = TO_CHAR(SYSDATE, 'MM/DD/YYYY')
GROUP BY FIELD_1
Any suggestions?
THANKS! Received on Fri Feb 27 2004 - 08:34:05 CST