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

KB214155: In MicroStrategy 9.x and 10.x, “0” is added to column alias in the report SQL


Community Admin

• Strategy


In MicroStrategy 9.x, a "0" gets added to the column alias in the report SQL. For example, a 31 characters long column alias is generated in the SQL for a column name which defined only 30 characters long

SYMPTOM
In Strategy 9.x, a "0" gets added to the column alias in the report SQL. For example, a 31 characters long column alias is generated in the SQL for a column name which defined only 30 characters long as shown below:

ka04W000000OhkAQAS_0EM440000002CDD.jpeg

In the SQL, a “0” is added to the 30 characters long column name to be the column alias; which makes it different from what is defined.


select a11.id_a  aa,
a11.id_b  bb,
a13.id_a  aa0,
a13.id_b  bb0,
a13.123456789012345678901234567890  1234567890123456789012345678900
from table1 a11
cross join table2 a13

 
CAUSE
This is working as designed. Strategy SQL engine adds the suffix ‘0’ to the column alias to distinguish multiple columns with the same column alias.
In the above example, there are two attribute forms with same column alias (a11.id_a, a13.id_a with column alias aa AND a11.id_b, a13.id_b with column alias bb). Therefore, the "0" gets added to distinguish the seconds instance. According to current logic, suffix ‘0’ will be added to ALL the forms of that attribute - therefore "0" is added to the column alias for the column "a13.123456789012345678901234567890" also. 
ACTION
There is no action needed as it is working as designed. Shorten the column alias if there is column name length restriction for specific database platforms.
 


Comment

0 comments

Details

Knowledge Article

Published:

April 17, 2017

Last Updated:

April 17, 2017