SYMPTOM
After upgrading from Strategy Analytics Enterprise 9.4 to Strategy Secure Enterprise 10.x, execution of a report against Greenplum database fails with following error:
Query failed to execute. Execute Query failed.
Error type: Odbc error. Odbc operation attempted: SQLExecDirect. [S0022:6820851: on HSTMT] [Strategy][ODBC Greenplum Wire Protocol driver][Greenplum]ERROR: column a14.xxx does not exist(Position 2632;File parse_func.c;Line 1402;Routine unknown_attribute;)
The SQL shows that there are some column names in mixed-case. The project stores the table/column names in the Strategy Metadata with the mixed-case names as the columns were named so on the database side at the time of importing them into the project. It is noticed that additional quotes are put around the column name of the join in the SQL causing the error; if the quotes are removed and the same SQL is run on DB query tool, it completes successfully.
CAUSEPrior to Strategy version 10.0, the Strategy SQL Engine did not support generating SQL to distinguish the case of database objects.
In Strategy 10.x, some database types (such as Greenplum) are updated to handle the scenario when a database has objects with mixed cased table and column names.
If the table or column name is stored in the Strategy Metadata with the mixed case, the SQL Engine now generates the quotes (or ticks for some DB types like MySQL) around the names. However, if the case of the current database name of the table or column is not the same as what is in the Strategy Metadata, the above discussed error can be seen.
Refer to the Strategy technical document below for details on how case sensitive database objects are supported in Strategy 10.x:
KB320442: New in MicroStrategy Secure Enterprise 10.x - SQL support for case sensitive database objects ACTIONRun a Warehouse catalog update to refresh the Metadata to pick up the change.
- Launch the Warehouse Catalog in Strategy Developer and choose all the tables used by the project.
- Select the option to update their structure (right click action on the highlighted tables).
- The column name for the tables in question are now updated to reflect the current name in the Greenplum warehouse.