Hi,
I am getting this error message when trying to run a select.
The error is coming from the following where clause:
WHERE
LOAN.loan_id = EOM.loan_id AND
CONTCT.loan_id = LOAN.loan_id AND
LOAN.dealer_id = TITLER.title_id AND
EOM.loan_id = NA.loan_id(+) AND
EOM.eom_date = NA.accrual_date (+) AND
EOM.loan_id = EOM2.loan_id AND
EOM.status like 'BK%' and EOM.status not like 'BKR%' AND
EOM2.status like 'BK%' and EOM2.status not
like 'BKR%'AND
EOM.balance > 0 AND
EOM.loan_balance > 0 AND
(((EOM.eom_date = TO_DATE('09/30/2005', 'MM/DD/YYYY'))
AND (EOM2.eom_date = ADD_MONTHS(TO_DATE('09/30/2005', 'MM/DD/YYYY'), -1))) AND
((EOM.contr_delinq_days >= 61) AND (EOM.contr_delinq_days <= 120))) OR
(EOM.contr_delinq_days >= 121);
I think the statement in bold is giving me the problem, but I am not sure about how to fix it.
The bolded area should be:
( 2 consecutive months with a BK% status code AND (contractual delinquency days >= 61 and contractual delinquency days <= 120 )
OR
contractual delinquency >= 121 days
If anyone could help me I would appreciate it.
getjbb
I am getting this error message when trying to run a select.
The error is coming from the following where clause:
WHERE
LOAN.loan_id = EOM.loan_id AND
CONTCT.loan_id = LOAN.loan_id AND
LOAN.dealer_id = TITLER.title_id AND
EOM.loan_id = NA.loan_id(+) AND
EOM.eom_date = NA.accrual_date (+) AND
EOM.loan_id = EOM2.loan_id AND
EOM.status like 'BK%' and EOM.status not like 'BKR%' AND
EOM2.status like 'BK%' and EOM2.status not
like 'BKR%'AND
EOM.balance > 0 AND
EOM.loan_balance > 0 AND
(((EOM.eom_date = TO_DATE('09/30/2005', 'MM/DD/YYYY'))
AND (EOM2.eom_date = ADD_MONTHS(TO_DATE('09/30/2005', 'MM/DD/YYYY'), -1))) AND
((EOM.contr_delinq_days >= 61) AND (EOM.contr_delinq_days <= 120))) OR
(EOM.contr_delinq_days >= 121);
I think the statement in bold is giving me the problem, but I am not sure about how to fix it.
The bolded area should be:
( 2 consecutive months with a BK% status code AND (contractual delinquency days >= 61 and contractual delinquency days <= 120 )
OR
contractual delinquency >= 121 days
If anyone could help me I would appreciate it.
getjbb