SYMPTOM:
In Strategy Developer 9.4.1 and 10.x, users notice that Null checks are ignored in the HAVING clause when the VLDB property "change the Additional Final Pass Option" is set to "One additional final pass only to join lookup tables".
STEPS TO REPRODUCE:
- In the Tutorial project within Strategy Developer, create a metric with the following definition: (Cost + Profit)
- Make sure the metric created in step 1 is not a smart metric.
- Create a report with the attributes Year, Quarter, Region and the metric from step 1 on the report template.
- Add a report limit setting the metric created in step 1 greater than zero.
- Under the VLDB properties for the report, change the Additional Final Pass Option setting to One additional final pass only to join lookup tables.
- Under the VLDB properties for the report, change the Null Checksetting to Check for NULL in all queries.
Running the report will yield the following SQL:
create view ZZEA00 (QUARTER_ID, REGION_ID, WJXBFS1) as
select a12.QUARTER_ID AS QUARTER_ID,
a13.REGION_ID AS REGION_ID,
(COALESCE(sum(a11.TOT_COST), 0) + COALESCE(sum((a11.TOT_DOLLAR_SALES - a11.TOT_COST)), 0)) AS WJXBFS1
from DAY_CTR_SLS a11,
LU_DAY a12,
LU_CALL_CTR a13
where a11.DAY_DATE = a12.DAY_DATE and
a11.CALL_CTR_ID = a13.CALL_CTR_ID
group by a12.QUARTER_ID,
a13.REGION_ID
having (sum(a11.TOT_COST) + sum((a11.TOT_DOLLAR_SALES - a11.TOT_COST))) > 0.0
*Note that the "having" clause does not contain the COALESCE function.
CAUSE:
This is a known issue in Strategy 9.4.1 and 10.x.
ACTION:
Currently this issue is still being reviewed for feasibility by our Technology team and it is not scoped for any upcoming scheduled Strategy release.