R
reddy
I need to accomplish the following. I need to count the number of loans by
Lender that fall under three categories: FlatCancel, PartialCancel & Inforce.
Here is a sample of the data
Lender Loan# EffectiveDt CancelDt
BLC 12 1/1/2008 1/1/2008
BLC 45 1/1/2008 4/03/2008
BLC 65 1/1/2008 Null
If the EffectiveDt=CancelDt then "FlatCancel" (Row1)
If the EffectiveDt<>CancelDt AND CancelDt is NotNull then "PartialCancel"
(Row2)
If the EffectiveDt is Null then "Inforce" (Row3)
The query should return:
Lender, IssueMth , IssueYr , #FlatCancels ,#PartialCancels, #Inforce
Lender that fall under three categories: FlatCancel, PartialCancel & Inforce.
Here is a sample of the data
Lender Loan# EffectiveDt CancelDt
BLC 12 1/1/2008 1/1/2008
BLC 45 1/1/2008 4/03/2008
BLC 65 1/1/2008 Null
If the EffectiveDt=CancelDt then "FlatCancel" (Row1)
If the EffectiveDt<>CancelDt AND CancelDt is NotNull then "PartialCancel"
(Row2)
If the EffectiveDt is Null then "Inforce" (Row3)
The query should return:
Lender, IssueMth , IssueYr , #FlatCancels ,#PartialCancels, #Inforce