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

KB9964: After modifying the expression of a filter using the ALTER FILTER statement in MicroStrategy Command Manager 9.x and 10.x the SQL generated for the report does not include quotes around the elements in the Between operator.


Community Admin

• Strategy


After modifying the expression of a filter using the ALTER FILTER statement in MicroStrategy Command Manager 9.x and 10.x the SQL generated for the report does not include quotes around the elements in the Between operator.

SYMPTOM:
After modifying the expression of a filter using the ALTER FILTER statement through Strategy Command Manager, SQL generated for the report does not include quotes around the attribute elements.
 
CAUSE:
The Command Manager script used to modify the filter is missing the single-quotes. To use single quotes, one must use the ^" (carat-double quote) escape sequence.
For example, below is the syntax of an incorrect command:
 
ALTER FILTER "Last_13_months" IN FOLDER "\public objects\Filters\Month" EXPRESSION "Month@ Between 200203 and 200303" ON PROJECT "Project_name";
The SQL generated by the engine appears as:
 
and a11.month_code between 200201 and 200301
Instead of:
 
and a11.month_code between '200201' and '200301'
ACTION:
To resolve this issue, users must modify the syntax of the script in the following way:
 
ALTER FILTER "Last_13_months" IN FOLDER "\public objects\Filters\Month" EXPRESSION "Month@ Between ^"200203^" and ^"200303^" " ON PROJECT "Project_name";
Note that the elements have now been added as: ^" ELEMENT_ID ^"
 
 
If the carat is not present, the quotes will be omitted in the generated SQL.
 


Comment

0 comments

Details

Knowledge Article

Published:

June 5, 2017

Last Updated:

June 5, 2017