0% found this document useful (0 votes)
22 views1 page

Update Contract Start Date in Header and Commitment Start Date in Line Table For New Contracts Coming Less Than 01-JUL-2018 Start Date

The document describes updating contract tables to set the commitment start date and contract start date to 01-JUL-2018 for contracts with dates before this where there are related line plans and the contract is coming in for the first time.

Uploaded by

Mukesh Dagar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views1 page

Update Contract Start Date in Header and Commitment Start Date in Line Table For New Contracts Coming Less Than 01-JUL-2018 Start Date

The document describes updating contract tables to set the commitment start date and contract start date to 01-JUL-2018 for contracts with dates before this where there are related line plans and the contract is coming in for the first time.

Uploaded by

Mukesh Dagar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Updating line contract table with commitment start date as 01-JUL-2018,

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)
)

Updating header contract table with contract start date as 01-JUL-2018,


contract are coming first time which contract start date less than 01-JUL-2018
-------------------------------------------------------------------------------
update ifrs15.NMTC_CONTR_HEADER_STG set contract_start_date='01-JUL-
2018',CONTRACT_ADD_INFO5='Manual update contract start date to 01-JUL-2018'
where batch_id=111
and contract_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)

You might also like