You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register
Get Started with Redwood for Oracle Cloud HCM   Begin Now
To ensure that questions get required attention from community members and are NOT left unanswered, it’s important for the author to indicate (by selecting “Yes” or “No” when prompted) whether the question was answered. (newly added) Please note that it is also important to respond to EACH comment your question receives. Your Yes or No response ensures an accurate status for your question.

For more information, please refer to this announcement explaining best practices for getting answers to questions.

Many case statement

edited Apr 4, 2018 11:08AM in Reporting and Analytics for HCM 4 comments

Summary

What is the correct syntax for many if

Content

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

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!