EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB8903: How to specify that metric names be used as column aliases in the SQL generated in MicroStrategy Developer 9.x and 10.x


Stefan Zepeda

Salesforce Solutions Architect • Strategy


How to specify that metric names be used as column aliases in the SQL generated in MicroStrategy Developer 9.x and 10.x

In Strategy Developer, by default, the metric name is not used as the column alias in the report Structured Query Language (SQL) generation.
For example, the metric Revenue in the following grid is referred to by the name of 'WJXBFS1' in the SQL, as shown in the report below:
 
 

    on    (pa1.REGION_ID = a12.REGION_ID)
Grid ViewSQL View

    on    (pa1.REGION_ID = a12.REGION_ID)
Grid ViewSQL View

 

select a11.CALL_CTR_ID CALL CTR_ID,
max(a12.CENTER_NAME) CENTER_NAME,
sum(a11.TOT_DOLLAR_SALES) WJXBFS1
from CITY_CTR_SLS a11
join LU_CALL_CTS a12
on (a11.CALL_CTR_ID = a12.CALL_CTR_ID)
group by a11.CALL_CTR_ID
Grid ViewSQL View

Strategy has a Very Large Database (VLDB) setting to allow users to change this default behavior at the project level so that the metric's name can be used as a column alias.
 
To change the Strategy SQL Engine's default behavior and use the metric's name as a column alias, configure the VLDB setting, 'Default to Metric Name'. To locate this setting:
 

  • Go to 'Project Configuration' for the specified project (Right-click on the project to open the Project Configuration editor).
  • Under 'Project Definition', choose 'Database instance'. The 'VLDB Properties' button will appear. Click on this button to open the VLDB Properties editor.
  • Open the Metrics folder. Under 'Default to Metric Name', uncheck the 'Use default inherited value' box and click the radio button for 'Use the metric name as the default metric column alias'.
ka02R000000kbzrQAA_0EM440000002G3o.gif
  •  
    Note: For this setting to take effect in 2-tier, the user must disconnect from the project source. In 3-tier, the Strategy Intelligence Server must be re-started.
     
  • Re-execute the report.

Observe in the SQL View that the metric column alias was changed to the metric's name, which is "Revenue".
 
 

select a11.CALL_CTR_ID CALL CTR_ID,
max(a12.CENTER_NAME) CENTER_NAME,
sum(a11.TOT_DOLLAR_SALES) WJXBFS1
from CITY_CTR_SLS a11
join LU_CALL_CTS a12
on (a11.CALL_CTR_ID = a12.CALL_CTR_ID)
group by a11.CALL_CTR_ID
Grid ViewSQL View

select a11.CALL_CTR_ID CALL CTR_ID,
max(a12.CENTER_NAME) CENTER_NAME,
sum(a11.TOT_DOLLAR_SALES) WJXBFS1
from CITY_CTR_SLS a11
join LU_CALL_CTS a12
on (a11.CALL_CTR_ID = a12.CALL_CTR_ID)
group by a11.CALL_CTR_ID
Grid ViewSQL View

 

select a11.CALL_CTR_ID CALL CTR_ID,
max(a12.CENTER_NAME) CENTER_NAME,
sum(a11.TOT_DOLLAR_SALES) REVENUE
from CITY_CTR_SLS a11
join LU_CALL_CTS a12
on (a11.CALL_CTR_ID = a12.CALL_CTR_ID)
group by a11.CALL_CTR_ID


Comment

0 comments

Details

Knowledge Article

Published:

June 2, 2017

Last Updated:

June 2, 2017