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.
For more information, please refer to this announcement explaining best practices for getting answers to questions.
BI publisher - How to use conditional statement in SQL query
Content
We have a payroll report, which accepts startdate and enddate from users.
So there are 3 scenarios this report is generated:
1. Startdate is first of the month and Enddate is 15th of the month
2. Startdate is the 16th of the month and Enddate is the last day of the month
3. Startdate is the 1st of the month and Enddate is the last day of the month
We need to generate report based on one of the above criteria. 3rd one will have 2 sets of reports as it is for the whole month.
Write now we are using 4 sets of query based on each criteria using the UNION operator. This is fine but it is a pain to maintain it.
0