Professional Documents
Culture Documents
Update Contract Start Date in Header and Commitment Start Date in Line Table For New Contracts Coming Less Than 01-JUL-2018 Start Date
Update Contract Start Date in Header and Commitment Start Date in Line Table For New Contracts Coming Less Than 01-JUL-2018 Start Date
contract are coming first time which contract start date less than 01-JUL-2018
-------------------------------------------------------------------------------
update ifrs15.NMTC_CONTR_LINES_STG set COMMIT_START_DATE='01-JUL-
2018' ,LINE_ADD_INFO5='Manual update commit start date to 01-JUL-2018'
where batch_id=111 and COMMIT_START_DATE < '01-JUL-2018'
and contract_num in (
SELECT DISTINCT contract_num
FROM ifrs15.nmtc_contr_header_stg a
WHERE 1 = 1
AND a.batch_id = :p_batch_id
AND load_status = 'N'
AND contract_start_date < '01-Jul-2018'
AND NOT EXISTS (SELECT 1
FROM ifrs15.nmtc_fah_contract_header b
WHERE a.contract_num = b.base_contract_num)
AND EXISTS
(SELECT /*+ index(b NMTC_CONTR_PLANS_STG_N2) */
1
FROM ifrs15.nmtc_contr_line_plans_stg b
WHERE a.contract_num = b.contract_num
AND b.service_start_date < '01-Jul-2018'
AND ABS (NVL (b.standalone_price, 0))
+ ABS (NVL (b.monthly_rec_chgs, 0)) <> 0
AND b.batch_id = a.batch_id)
)