Users whose Accounts are in Pending/Rejected State.
SELECT SCH.SCH_key,mil.mil_name, usr.usr_key,usr.usr_login
FROM SCH , OSI osi, MIL, STA, TOS,PKG, usr,orc
WHERE SCH.SCH_KEY =OSI.SCH_KEY
AND OSI.MIL_KEY =MIL.MIL_KEY
AND SCH.SCH_STATUS =STA.STA_STATUS
AND PKG.PKG_KEY = OSI.PKG_KEY
AND MIL.TOS_KEY =TOS.TOS_KEY
AND PKG.PKG_KEY =TOS.PKG_KEY
and osi.orc_key=orc.orc_key
and orc.usr_key=usr.usr_key
AND PKG.PKG_TYPE = 'Provisioning'
AND STA.STA_BUCKET = 'Rejected' --//Pending
AND TO_CHAR(SCH.SCH_CREATE, 'YYYYMMDD') <= '20170406'
AND MIL.MIL_NAME= '?' order by SCH.SCH_key;
-- ? is name of MIL_NAME for which type of tasks are going get reject/Pending States. ex: MIL.MIL_NAME= 'Create User'
SELECT SCH.SCH_key,mil.mil_name, usr.usr_key,usr.usr_login
FROM SCH , OSI osi, MIL, STA, TOS,PKG, usr,orc
WHERE SCH.SCH_KEY =OSI.SCH_KEY
AND OSI.MIL_KEY =MIL.MIL_KEY
AND SCH.SCH_STATUS =STA.STA_STATUS
AND PKG.PKG_KEY = OSI.PKG_KEY
AND MIL.TOS_KEY =TOS.TOS_KEY
AND PKG.PKG_KEY =TOS.PKG_KEY
and osi.orc_key=orc.orc_key
and orc.usr_key=usr.usr_key
AND PKG.PKG_TYPE = 'Provisioning'
AND STA.STA_BUCKET = 'Rejected' --//Pending
AND TO_CHAR(SCH.SCH_CREATE, 'YYYYMMDD') <= '20170406'
AND MIL.MIL_NAME= '?' order by SCH.SCH_key;
-- ? is name of MIL_NAME for which type of tasks are going get reject/Pending States. ex: MIL.MIL_NAME= 'Create User'
No comments:
Post a Comment