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

KB484524: How to change the data type of a column alias to avoid reports with emoji from returning no data


Xiaoqian Lu

Quality Engineer, Principal • MicroStrategy


This article explains how to change the data type of a column alias in an attribute form to avoid reports with emojis from returning no data after enabling parameterized query for text input.

Description 


If a report contains an emoji in a column and the data type of the column alias in the attribute form is set to Char or VarChar, no data is returned. In Strategy 2021, parameterized query for text input and column type hint for secure text input are enabled for the SQL Server by default. With this feature enabled, reports with emojis may continue to not return data–the same behavior as having the feature disabled. 

ka04W000000XP5YQAW_0EM4W000001IRjb.jpeg

Why is this happening? 


The report is composed of attributes with emojis and the corresponding column is stored as NVarChar in the SQL Server database. However, the data type of the column alias is set to Char or VarChar in Strategy, which is not consistent with the data type of the SQL Server database column. When running the report with parameterized query for text input and column type hint for secure text input enabled, the emoji cannot be retrieved from the SQL Server database.

ka04W000000XP5YQAW_0EM4W000001IRk0.jpeg

Solution


There are two ways to workaround this issue.
 

Workaround 1: Disable column type hint for secure text input and keep parameterized query for text input enabled for the SQL Server

  • Remove
    <PROPERTY NAME="Column Type Hint for Secure Text Input" VALUE="1" />
    under the
    VLDB Data Type
    section in
    DATABASE.PDS
    .
ka04W000000XP5YQAW_0EM4W000001IRk5.jpeg
  • Upgrade the metadata.
  • Reload
    DATABASE.PDS
    for the SQL Server.
  • Restart the Intelligent Server for the changes to take effect.

Workaround 2: Set the data type of the column alias to NVarChar

  • Edit the attribute form.
ka04W000000XP5YQAW_0EM4W000001IRkA.jpeg
  • Modify the column alias.
ka04W000000XP5YQAW_0EM4W000001IRkF.jpeg
  • Create a new column with the data type, NVarChar. Please note that a new column name should be used.
ka04W000000XP5YQAW_0EM4W000001IRkP.jpeg
ka04W000000XP5YQAW_0EM4W000001IRke.jpeg
  • Save the changes.
  • Update the schema.

Comment

0 comments

Details

Knowledge Article

Published:

August 21, 2020

Last Updated:

December 18, 2020