SYMPTOM:
The SQL Generation Engine is generating the statements below in the SQL of a report in Strategy:
[Analytical SQL calculated by the Analytical Engine: ]
insert into ZZMD00 values ([DummyInsertValue])
STEPS TO REPRODUCE:
Follow the steps below to obtain the statements above in the Strategy Tutorial Project:
select a11.[SUBCAT_ID] AS SUBCAT_ID,
sum(a11.[TOT_DOLLAR_SALES]) AS WJXBFS1
from [STATE_SUBCATEG_REGION_SLS] a11
group by a11.[SUBCAT_ID]
create table ZZMD00 (
SUBCAT_ID SHORT,
WJXBFS1 DOUBLE)
[Analytical SQL calculated by the Analytical Engine: ]
insert into ZZMD00 values ([DummyInsertValue])
create table ZZMD01 (
SUBCAT_ID SHORT,
Revenue DOUBLE)
insert into ZZMD01
select a11.[SUBCAT_ID] AS SUBCAT_ID,
sum(a11.[TOT_DOLLAR_SALES]) AS Revenue
from [CITY_SUBCATEG_SLS] a11
group by a11.[SUBCAT_ID]
select pa11.[SUBCAT_ID] AS SUBCAT_ID,
a13.[SUBCAT_DESC] AS SUBCAT_DESC,
pa12.[WJXBFS1] AS WJXBFS1,
pa11.[Revenue] AS Revenue
from [ZZMD01] pa11,
[ZZMD00] pa12,
[LU_SUBCATEG] a13
where pa11.[SUBCAT_ID] = pa12.[SUBCAT_ID] and
pa11.[SUBCAT_ID] = a13.[SUBCAT_ID]
drop table ZZMD00
drop table ZZMD01
CAUSE:
This is working as designed. The Analytical Engine is performing some calculation or manipulation of the data that is returned in the first pass of the report SQL to use in subsequent passes.
The Analytical SQL can be divided in to parts:
KB5273: Diagnostic logs to enable when troubleshooting Strategy Engine