[This topic is migrated from our old forums. The original author name has been removed]
Hi Roger,
here a nice sql for the formatter:
select * from (
select owner, job_name, round(regr_r2 (secs, x),2) rsqr ,
round(regr_slope (secs, x),2) slope ,
regr_count (secs,x) points ,
round(regr_intercept (secs,x),2) b
from (
select rownum x, owner, job_name, status,
extract(day from run_duration) * (60 * 60 * 24) +
extract(hour from run_duration) * (60 * 60) +
extract(minute from run_duration) * 60 +
extract(second from run_duration) secs
from dba_scheduler_job_run_details
order by 1,2,3
)
group by owner,job_name
) where slope > 0
-----------------------------------------------
extract (x from y) is just a function call, not a select from a table.
Ronald.
http://ronr.nl/unix-dba
anonymous