You are on page 1of 1

Join opb_scheduler , opb_wflow and opb_scheduler_logic to get the required detai ls.. select a.subject_area,a.workflow_name,b.scheduler_id, b.SCHEDULER_NAME, b.

scehdu led_time ,c.DAILY_LOGIC, c.monthly_logic,c.weekly_logic from rep_workflows a,(select scheduler_id,SCHEDULER_NAME,START_TIME,scehduled_t ime from (select a.scheduler_id, a.SCHEDULER_NAME ,a.START_TIME , to_date(concat(to_char(sysdate,'DD.MM.YYYY'),su bstr(a.START_TIME,(length(a.STAR T_TIME)-4),5)),'DD.MM.YYYYHH24/MI') as scehduled_time, RANK() OVER (PARTITION BY a.scheduler_id ORDER BY a.VERSION_NUMBER DESC ) RANK1 from OP B_SCHEDULER a where a.scheduler_name <> 'Scheduler' order by scheduler_id) where RANK1=1 ) b ,(select scheduler_id,DAILY_LOGIC,weekly_logic,monthly_logi c from (select a.sch eduler_id,a.DAILY_LOGIC, a.weekly_logic,a.monthly_logic , RANK() OVER (PARTITION BY a.scheduler_id ORDER BY a.VERSION_NUMBER DESC ) RANK1 from OPB_SCHEDULE_LOGIC a where a.USER_LOGIC_TYPE<>1 order by scheduler_id) where RANK1=1) c where a.WORKFLOW_IS_VALID=1 and a.SCHEDULER_ID=b.SCHEDULER_ID(+) and a.SCHEDULER_ID=c.SCHEDULER_ID(+) and b.scheduler_name <> 'Scheduler'; this will give all scheduled jobs if daily logic is null or any value means its daily scheduled. weekly logic is not null means weekly scheduled montlhy logic not null means monthly scheduled. Now which day of week its scheduled is bit tricky. for Sunday weekly logic will be 1 monday 3..do some trials with all days in week and get the 'weekly logic' f or which day of week.. Hope this helps.. Run time you have to get from rep_wf_run. I have used rank in sub table to get l atest version of the scheduler.

You might also like