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.