Selecting data via a time calculation
Posted on 2004-09-14
I searched and found a few solutions close to what I'm looking for, but nothing got me over the hump.
My SQL statement follows:
select log_field1 Customer, document_number BOL_Number, log_field5 Purchase_Order, log_field3
where to_char(transaction0.document_date, 'mmddyy') = to_char(sysdate, 'mmddyy') and
log_field4 = 'O'
order by log_field3 desc
In english pseudocode, here is essentially what i'm looking for.
where log_field3 >= (Current Time - 60)
(All records from the past 60 minutes)
The time field (log_field3) follows the format: 0800, 1200, etc. So I believe its in the correct format to be compared to the systime.
Any help would be appreciated.