MicroStrategy ONE
Cleanup Post Statement
The Cleanup Post Statement property allows you to insert your own SQL string after the final DROP statement. There are five settings, numbered 1-5. Each text string entered in Cleanup Post Statement 1 through Cleanup Post Statement 4 is executed separately as a single statement. To execute more than 5 statements, insert multiple statements in Cleanup Post Statement 5, separating each statement with a ";". The SQL Engine then breaks it into individual statements using ";" as the separator and executes the statements separately.
Levels at Which You Can Set This
Database instance, report, and template
Example
In the following example the setting values are:
Cleanup Post Statement1=/* Cleanup Post Statement1 */
Create table TABLENAME
(ATTRIBUTE_COL1 VARCHAR(20),
FORM_COL2 CHAR(20),
FACT_COL3 FLOAT)
primary index (ATTRIBUTE_COL1, FORM_COL2)
insert into TABLENAME
select A1.COL1,
A2.COL2,
A3.COL3
from TABLE1 A1,
TABLE2 A2,
TABLE3 A3
where A1.COL1 = A2.COL1 and A2.COL4=A3.COL5
insert into TABLENAME
select A1.COL1,
A2.COL2,
A3.COL3
from TABLE4 A1,
TABLE5 A2,
TABLE6 A3
where A1.COL1 = A2.COL1 and A2.COL4=A3.COL5
create index IDX_TEMP1(STORE_ID, STORE_DESC)
select A1.STORE_NBR,
max(A1.STORE_DESC)
from LOOKUP_STORE
Where A1 A1.STORE_NBR = 1
group by A1.STORE_NBR
drop table TABLENAME
/* Cleanup Post Statement 1*/