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