MicroStrategy ONE

Report Post Statement

The Report Post Statement property is used to insert custom SQL statements after the final SELECT statement but before the DROP statements. There are five settings, numbered 1-5. Each text string entered in Report Post Statement 1 through Report Post Statement 4 is executed separately as a single statement. To execute more than 5 statements, insert multiple statements in Report Post Statement 5, separating each statement with a ";". The SQL Engine then breaks them into individual statements using ";" as the separator and executes the statements separately.

If you do not modify the Element Browsing Post Statement VLDB property, the statements defined in this Report Post Statement VLDB property are also used for element browsing requests. For example, an element browsing request occurs when a user expands an attribute to view its attribute elements. To define statements that apply only to element browsing requests, seeElement Browsing Post Statement.

Levels at Which You Can Set This

Database instance, report, and template

Example

In the following example, the setting values are:

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 
/* Report Post Statement 1*/
drop table TABLENAME