Query for Closed Provisioning Tasks:
select distinct(SELECT usr_login FROM usr WHERE usr_key = oiu.usr_key) AS "target_user",
obj.obj_name AS "resource_name",
mil.mil_name AS "task_name",
sta.sta_bucket AS "task_status",
usr.usr_login AS "assigned_to_user",
sch.sch_actual_start AS "task_created_date",
sch.sch_actual_end AS "task_completed_date"
From OSI,MIL,ORC,SCH,STA,USR,OSH,OIU,OBI,OBJ,PKG
Where osh.sta_key = sta.sta_key
AND sch.sch_key = osh.sch_key
AND sch.sch_key = osi.sch_key
AND osi.mil_key = mil.mil_key
AND sch.sch_key = osh.sch_key
AND sch.sch_key = osi.sch_key
AND osi.mil_key = mil.mil_key
AND osi.orc_key = orc.orc_key
AND orc.orc_key = oiu.orc_key
AND obi.obi_key = oiu.obi_key
AND obj.obj_key = obi.obj_key
AND sta.sta_bucket = 'Completed'
AND mil.mil_name != 'System Validation'
AND osh.osh_assigned_to_usr_key = usr.usr_key
AND osh.osh_assigned_to_usr_key IS NOT NULL
AND osh.osh_assigned_to_usr_key != '1'
AND pkg.pkg_type = 'Provisioning'
AND usr.usr_login not in ('OIMINTERNAL','XELSYSADM')
AND sch.sch_actual_end between :from_date and :todate
Thanks !!!
select distinct(SELECT usr_login FROM usr WHERE usr_key = oiu.usr_key) AS "target_user",
obj.obj_name AS "resource_name",
mil.mil_name AS "task_name",
sta.sta_bucket AS "task_status",
usr.usr_login AS "assigned_to_user",
sch.sch_actual_start AS "task_created_date",
sch.sch_actual_end AS "task_completed_date"
From OSI,MIL,ORC,SCH,STA,USR,OSH,OIU,OBI,OBJ,PKG
Where osh.sta_key = sta.sta_key
AND sch.sch_key = osh.sch_key
AND sch.sch_key = osi.sch_key
AND osi.mil_key = mil.mil_key
AND sch.sch_key = osh.sch_key
AND sch.sch_key = osi.sch_key
AND osi.mil_key = mil.mil_key
AND osi.orc_key = orc.orc_key
AND orc.orc_key = oiu.orc_key
AND obi.obi_key = oiu.obi_key
AND obj.obj_key = obi.obj_key
AND sta.sta_bucket = 'Completed'
AND mil.mil_name != 'System Validation'
AND osh.osh_assigned_to_usr_key = usr.usr_key
AND osh.osh_assigned_to_usr_key IS NOT NULL
AND osh.osh_assigned_to_usr_key != '1'
AND pkg.pkg_type = 'Provisioning'
AND usr.usr_login not in ('OIMINTERNAL','XELSYSADM')
AND sch.sch_actual_end between :from_date and :todate
Thanks !!!
No comments:
Post a Comment