Query To Find the Contracts that have been Renewed
/* Formatted on 2014/01/03 14:58 (Formatter Plus v4.8.8) */
SELECT a.contract_number, a.contract_number_modifier, a.date_renewed,
a.start_date, a.end_date, a.sts_code,
DECODE (a.renewal_type_code,
'DNR', 'DO NOT RENEW',
'NSR', 'MANNUAL'
) "RENEWAL TYPE"
FROM okc_k_headers_all_b a
WHERE sts_code = 'ACTIVE' AND a.end_date = TRUNC (SYSDATE) + 119
OR a.start_date = TRUNC (SYSDATE) + 120
ORDER BY contract_number ASC
/* Formatted on 2014/01/03 14:58 (Formatter Plus v4.8.8) */
SELECT a.contract_number, a.contract_number_modifier, a.date_renewed,
a.start_date, a.end_date, a.sts_code,
DECODE (a.renewal_type_code,
'DNR', 'DO NOT RENEW',
'NSR', 'MANNUAL'
) "RENEWAL TYPE"
FROM okc_k_headers_all_b a
WHERE sts_code = 'ACTIVE' AND a.end_date = TRUNC (SYSDATE) + 119
OR a.start_date = TRUNC (SYSDATE) + 120
ORDER BY contract_number ASC
No comments:
Post a Comment