For more information, please refer to this announcement explaining best practices for getting answers to questions.
Many case statement
Summary
What is the correct syntax for many ifContent
Hi,
I would like to create a column (in OTBI report) that group the employees by their seniority (in years).
So for example: 0-3, 4-7, 7-11, etc.
I tried the below formula but the syntax is wrong.
Could someone help me to understand what should be the right syntax?
The formula is -
CASE WHEN TIMESTAMPDIFF(SQL_TSI_YEAR, "Worker"."Enterprise Seniority Date", CURRENT_DATE)>0 AND TIMESTAMPDIFF(SQL_TSI_YEAR, "Worker"."Enterprise Seniority Date", CURRENT_DATE)<3 THEN '0-3' CASE WHEN TIMESTAMPDIFF(SQL_TSI_YEAR, "Worker"."Enterprise Seniority Date", CURRENT_DATE)>3 AND TIMESTAMPDIFF(SQL_TSI_YEAR, "Worker"."Enterprise Seniority Date", CURRENT_DATE)<8 THEN '4-7' CASE WHEN TIMESTAMPDIFF(SQL_TSI_YEAR, "Worker"."Enterprise Seniority Date", CURRENT_DATE)>7 THEN '7-11' ELSE