Brain freeze doing Date comparisons

Hi all,

Dealing with management has made my brain freeze and I'm stumped.

I have a table as :
dep_id    number -- my primary key for most tables in system
xml_clob  --manually generated clob field
update_date timestamp -- when this record was added
updated_by varchar2(30) --userid of person

Management wants a 'robust' auditing system in place, so my approach
is if a piece of data in any table for a particular record has been
changed or added, etc., then I'll copy my current xml_clob field from
my master search table (which is always up-to-date) into this other
table. But, I only want to do it if this hasn't been done within the
last hour. So, in essence, at the most, I'll only have one record in
this table for every 60 minutes.

So, my problem is selecting only the most current record in this table
(if one exists), and checking to see if it was added within the last
60 minutes.

This is for Oracle 11 on Windows.

Thanks for your help.

-- 
-- Bill Ferguson
--
http://www.freelists.org/webpage/oracle-l


Other related posts: