SELECT distinct certd_app_inst.cert_id AS certification_id,cert_certs.cert_name AS certificationname, cert_certs.createdate AS certification_creation_date,
decode(cert_certs.state,1,'YET_TO_START',2,'WIP',3,'COMPLETED',4,'EXPIRED',cert_certs.state) certification_state, A.attribute_value as entitlement,A.description as entitlement_description,
A.account_name,A.first_name,A.last_name,decode(A.decision,0,'REVOKE',1,'CERTIFY',3,'CERTIFY CONDITIONALLY FOR REASSIGN',A.decision) decision, A.certified_by,A.certification_date,A.comments,A.endpoint_name,
(case when lower(A.account_name) = lower(A.certified_by) then 'Y' when lower(A.account_name) != lower(A.certified_by) then 'N' else null end) is_self_attested FROM
certs_app_inst,certd_app_inst,cert_certs, (SELECT certs_acct_ent_asgn.attribute_value AS attribute_value,certs_acct_ent_asgn.short_description AS description, certd_acct_ent_asgn.account_id
AS account_id,certs_account.account_name AS account_name, certs_user.firstname AS first_name,certs_user.lastname AS last_name, certd_acct_ent_asgn.cert_id AS cert_id,certd_acct_ent_asgn.certified AS decision,
certd_acct_ent_asgn.certified_by AS certified_by,certd_acct_ent_asgn.certification_date AS certification_date, certd_acct_ent_asgn.comments AS comments,certs_account.endpoint_name AS endpoint_name,
certs_account.endpoint_id AS endpoint_id FROM certs_acct_ent_asgn, certd_acct_ent_asgn,certs_user,certs_account WHERE certs_acct_ent_asgn.id = certd_acct_ent_asgn.account_attribute_id AND
certs_acct_ent_asgn.parent_id = 0 AND certd_acct_ent_asgn.user_id = certs_user.id AND certs_acct_ent_asgn.account_id = certs_account.id AND certs_acct_ent_asgn.account_id IN
(SELECT certs_account.id FROM certs_account, certd_user_acct WHERE certs_account.id = certd_user_acct.account_id)) A WHERE cert_certs.id = certd_app_inst.cert_id
AND certs_app_inst.id = certd_app_inst.endpoint_id AND A.cert_id = certd_app_inst.cert_id AND A.endpoint_id = certs_app_inst.iam_endpoint_id
AND A.decision=0 AND trunc(cert_certs.createdate) = upper('dd-MM-yy') AND cert_certs.cert_name like '%Certificate Definition Name%' ORDER BY certd_app_inst.cert_id desc, A.account_name;
Note :
Ex :
Certificate Definition Name = Oracle CRM
Date (dd-MM-yy) = 11-JAN-2021
No comments:
Post a Comment