SQL*Plus (MOSC)

MOSC Banner

Need help with calculating date

edited Jun 29, 2012 4:54AM in SQL*Plus (MOSC) 3 comments
Hi..

I need help calculating a date value..  This is the script:

select
 target_name,
 target_type,
 sum(trunc((nvl(end_timestamp,sysdate)-start_timestamp)*24)) total_hours
FROM mgmt$Availability_history
where target_name = 'ORCL'
group by target_name,availability_status, target_type
/
 
This scripts operates against the OEM view mgmt$availability_history.  The results of this query are in total hours for a six month period.  I need to limit the time period to 30 days of values.  How would I best accomplish this?

Thanks..

NS

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center