RE: Time Question

2002-01-24 Thread Jamadagni, Rajendra
Select col_1, col_2 from my_table where col_timestamp is between sysdate and (sysdate - 30/1440) group by col_1 Assuming col_timestamp is a column in your table with datatype of DATE. HTH Raj __ Rajendra Jamadagni MIS, ESPN Inc.

RE: Time Question

2002-01-24 Thread Post, Ethan
Lance, My performance monitor aggregates frequent samples into smaller tables using this method. I create a function then write a query using the function and pass in the date column. The group by averages the values for me. CREATE OR REPLACE FUNCTION nearest_even_hour (p_date IN DATE) RETURN

Re: Time Question

2002-01-24 Thread Ron Rogers
Lance, Does you table load include a date field with the hh:mm:ss. If it does not than how do you propose to find when a row was inserted. You could use logminer and check the archivelogs if there was a crutial need to know. I would add a column to the table that would hold a datetime stamp and

Re: Time Question

2002-01-24 Thread Jared . Still
An easier and more accurate method would be to create a column in the table and populate it with a sequence. When you run your query, include in the WHERE clause ' and my_sequence_num sequence_last_time_i_checked ' You would just need to record the last sequence number checked in a single row

RE: Time Question

2002-01-24 Thread Bellows, Bambi
Yep, so long as there was a timestamp on the records. -Original Message- Sent: Thursday, January 24, 2002 12:55 PM To: Multiple recipients of list ORACLE-L I am not sure how to ask this or if it is even possible. I have a stored procedure that runs every five minutes and writes the

RE: Time Question

2002-01-24 Thread Kevin Lange
If you have a field in the data that keeps track of when it was inserted then you could always add a line in the where to check for a 30 minute difference. Something like : where sysdate-time_field = 30/1440 This should get you all data 30 minutes or less old. -Original Message-