Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends
I have written under mentioned script in my data load
IF(Num(YEAR(CEN_CL_LOSS_DATE))& num(MONTH(CEN_CL_LOSS_DATE))=Num(YEAR(CEN_CL_INT_DATE))& num(MONTH(CEN_CL_INT_DATE)),'SAME_MONTH',
IF(DATE(AddMonths(CEN_CL_LOSS_DATE)=DATE(AddMonths(CEN_CL_INT_DATE,-1),'LAST_MONTH'),'OTHER_MONTHS'))AS PERIOD,
But it does give a error message with
"Error in expression:AddMonths takes 2-3 parameters"
Kindly help me to solve the issue.
My requirement is if Month & Year of CEN_CL_LOSS_DATE= month & year CEN_CL_LOSS_DATE it should be categarised as same month. If the two fields are not equal by 1 month it should be 'Last Minth' otherwise 'Other Months'
I guess the problem lies in this part of the sentence:
IF(Num(YEAR(CEN_CL_LOSS_DATE))& num(MONTH(CEN_CL_LOSS_DATE))=Num(YEAR(CEN_CL_INT_DATE))& num(MONTH(CEN_CL_INT_DATE)),'SAME_MONTH',
IF(DATE(AddMonths(CEN_CL_LOSS_DATE, 0)=DATE(AddMonths(CEN_CL_INT_DATE,-1),'LAST_MONTH'),'OTHER_MONTHS'))AS PERIOD,