MicroStrategy ONE

Select Statement Post String

The Select Statement Post String VLDB property allows you to define a custom SQL string to be inserted at the end of the final SELECT statement.

This can be helpful if you use common table expressions with an IBM DB2 database. These common table expressions do not support certain custom SQL strings. This VLDB property allows you to apply the custom SQL string to only the final SELECT statement which does not use a common table expression.

Levels at Which You Can Set This

Database instance, report, and template

The SQL statement shown below displays an example of where the Select Post String and Select Statement Post String VLDB properties include their SQL statements.

Copy
with gopa1 as 
(select a12.REGION_ID REGION_ID
 from CITY_CTR_SLS a11
 join LU_CALL_CTR a12 
 on (a11.CALL_CTR_ID = a12.CALL_CTR_ID)
 group by a12.REGION_ID
 having sum(a11.TOT_UNIT_SALES) = 7.0
/* select post string */)select
 a11.REGION_ID REGION_ID,
 a14.REGION_NAME REGION_NAME0,
 sum(a11.TOT_DOLLAR_SALES) Revenue
from STATE_SUBCATEG_REGION_SLS a11
 join gopa1 pa12
 on (a11.REGION_ID = pa12.REGION_ID)
 join LU_SUBCATEG a13
 on (a11.SUBCAT_ID = a13.SUBCAT_ID)
 join LU_REGION a14
 on (a11.REGION_ID = a14.REGION_ID)
where a13.CATEGORY_ID in (2)
group by a11.REGION_ID,
a14.REGION_NAME/* select post string */
 /* select statement post string */