Hi,
I am a new member here. I'm using ReportSmith version4.2 with ADP PCPW. I'm trying to build a case statement. However, I can't not get it to work. Here is my statement:
CASE
WHEN "REPORTS.V_EMPLOYEE.COMPANYCODE" ='MGE' THEN @DECODE(REPORTS.V_EMPLOYEE.STATUSFLAG2,'1', @IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/4.01),@IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/9.01),11.67,9.73),7.78),'2', @IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/4.01.0),@IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/9.01),8.75,7.29),5.84),'3', @IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/4.01),@IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/9.01),7.77,6.48),5.18),'4', @IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/4.01),@IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/9.01),5.84,4.87),3.89),'5', @IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/4.01),@IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/9.01),11.67,10.00),8.34),'6', @IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/4.01),@IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/9.01),8.75,7.5),6.25),'7', @IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/4.01),@IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/9.01),7.77,6.66),5.55),'8', @IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/4.01),@IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/9.01),5.84,5.00),4.17),'J', @IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/4.01),@IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/9.01),11.67,11.67),10.00),'K', @IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/4.01),@IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/9.01),13.34,13.34),11.67) ) END
MY DECODE AND IF STATEMENT ARE WORKING FINE.
PLEASE HELP.
THANKS
I am a new member here. I'm using ReportSmith version4.2 with ADP PCPW. I'm trying to build a case statement. However, I can't not get it to work. Here is my statement:
CASE
WHEN "REPORTS.V_EMPLOYEE.COMPANYCODE" ='MGE' THEN @DECODE(REPORTS.V_EMPLOYEE.STATUSFLAG2,'1', @IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/4.01),@IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/9.01),11.67,9.73),7.78),'2', @IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/4.01.0),@IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/9.01),8.75,7.29),5.84),'3', @IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/4.01),@IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/9.01),7.77,6.48),5.18),'4', @IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/4.01),@IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/9.01),5.84,4.87),3.89),'5', @IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/4.01),@IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/9.01),11.67,10.00),8.34),'6', @IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/4.01),@IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/9.01),8.75,7.5),6.25),'7', @IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/4.01),@IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/9.01),7.77,6.66),5.55),'8', @IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/4.01),@IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/9.01),5.84,5.00),4.17),'J', @IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/4.01),@IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/9.01),11.67,11.67),10.00),'K', @IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/4.01),@IF(@INT(((@now-REPORTS.V_EMPLOYEE.SENIORITYDATE)/365)/9.01),13.34,13.34),11.67) ) END
MY DECODE AND IF STATEMENT ARE WORKING FINE.
PLEASE HELP.
THANKS