3 queries found for "Bill Cycle Schedule"
Retrieve bill cycle open for a period
select * from ci_bill_cyc_sch
where win_start_dt <= to_date('11-11-2012','MM-DD-YYYY') and win_end_dt >= to_date('11-11-2012','MM-DD-YYYY');
uploaded by Vinayak Gadgil
Retrieve Next Bill Date
SELECT MIN(WIN_START_DT) AS START_DATE FROM CI_BILL_CYC_SCH
WHERE BILL_CYC_CD = 'Insert Bill Cycle Code'
AND WIN_START_DT >= TRUNC(SYSDATE)
uploaded by Roopesh Rekhawar
Retrieve open bill cycles to get the account final bill on the same night
-- Once all the active service agreement's on the account are stopped, the account needs to be final billed on the same night. If the account's current bill cycle code is not in open for billing then the below query is used to retrieve the open bill cycles.
SELECT A.BILL_CYC_CD, A.WIN_START_DT
FROM CISADM.CI_BILL_CYC_SCH A
WHERE A.FREEZE_COMPLETE_SW = 'Y'
AND A.WIN_START_DT = (SELECT MIN(B.WIN_START_DT)
FROM CISADM.CI_BILL_CYC_SCH B
WHERE B.FREEZE_COMPLETE_SW = 'Y'
AND (B.WIN_START_DT > 'Insert input date' OR (B.WIN_START_DT <= 'Insert input date' AND B.WIN_END_DT >= 'Insert input date'))
AND B.BILL_CYC_CD <> 'Insert input account's bill cycle code')
AND A.WIN_END_DT >= 'Insert input date'
AND A.BILL_CYC_CD <> 'Insert input account's bill cycle code'
ORDER BY A.WIN_START_DT;
uploaded by Roopesh Rekhawar