CA_LINE_PPD_VW

(SQL View)
Index Back

Prepaids by Contract Line

If a prepaid applies to the current contract line directly or indirectly (by applying to "all" contract lines), return an 'x'.

SELECT DTL.CONTRACT_NUM , DTL.CONTRACT_LINE_NUM , 'X' FROM PS_CA_DETAIL DTL WHERE EXISTS ( SELECT 'X' FROM PS_CA_PREPAID_TBL PPD WHERE PPD.CONTRACT_NUM = DTL.CONTRACT_NUM AND PPD.CA_PPD_STATUS <> 'I' AND (PPD.CONTRACT_LINE_NUM = DTL.CONTRACT_LINE_NUM OR PPD.USE_FOR_CONTRACT = 'Y'))

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 CONTRACT_NUM Character(25) VARCHAR2(25) NOT NULL Contract
2 CONTRACT_LINE_NUM Number(3,0) SMALLINT NOT NULL Contract Line Num
3 PREPAID_FLAG Character(1) VARCHAR2(1) NOT NULL Prepaid offering
N=Exclude Prepaid
Y=Include Prepaid