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

KB319117: Freeform SQL report execution errors occur in MicroStrategy 10.5 when the custom SQL contains certain reserved characters.


Community Admin

• Strategy


This Knowledge Base Article describes an issue with free form SQL reports that contain special characters in the custom SQL, this behavior has been observed in MicroStrategy 10.5.

SUMMARY
This Knowledge Base Article describes an issue with free form SQL reports that contain special characters in the custom SQL, this behavior has been observed in Strategy 10.5.
SYMPTOM
Free form SQL Reports that contain special characters in the custom SQL, fail with an execution error and the SQL View of the report does not show “SQL Statements”.
Example errors that could be seen in the DSSErrors.log are:
For DB2:


Error type: Odbc error. Odbc operation attempted: SQLExecDirect. [HY000:-198: on SQLHANDLE] [Strategy][ODBC DB2 Wire Protocol driver][UDB DB2 for iSeries and AS/400]OPERAND OF PREPARE OR EXECUTE IMMEDIATE STATEMENT BLANK OR EMPTY. For more information, please consult DB2 document for error code SQL0198. 

For Access:

Error type: Odbc error. Odbc operation attempted: SQLExecDirect. [HY009:70: on SQLHANDLE] [Microsoft][ODBC Microsoft Access Driver]Invalid use of null pointer

Error when executing the Report:

2016-10-27 17:48:40.707 [HOST:xxx][SERVER:][PID:xxx][THR:xxx][Query Engine][Error][0x80042300] QueryEngine encountered error: Execute Query failed. 
Error type: Odbc error. Odbc operation attempted: SQLExecDirect. [HY009:70: on SQLHANDLE] .


STEPS TO REPRODUCE:
Follow these steps to reproduce the issue with the Strategy Tutorial Microsoft Access Metadata, for demonstration purposes; the below steps created are tested in Strategy 10.4 where we can compare how the SQL should be shown:

  1. Create a freeform SQL report in Strategy Developer version 10.4, where the names of the columns contain special characters:

For this test the following SQL statement is used: Select column#, column$, column_1, column_2, column; from LU_day

ka04W000001484cQAA_0EM440000002BzL.jpeg

 
2. Run the report and select the SQLview in 10.4 for the Report. The SQL statement is shown, as it’s seen in the image below:

ka04W000001484cQAA_0EM440000002BzF.jpeg

In Strategy Developer 10.5
3. Create a Free form SQL report, you can use the same SQL Statement:


Select column#, column$, column_1, column_2, column; from LU_day;

4. Run the Free form SQL report and an execution error is shown:

ka04W000001484cQAA_0EM440000002BzN.jpeg

5. Run SQLView for the Free form SQL report created before. Note how no SQL statement is shown:

ka04W000001484cQAA_0EM440000002Bzc.jpeg

CAUSE:
This has been identified as a defect in Strategy Developer 10.5
ACTION:
This issue has been fixed in Strategy 10.7.
WORKAROUND:

  1. Escaping the special characters in the custom SQL for the Free form Report, will let the report execute successfully. The following image shows the report created in step 1, escaping the special characters by using double quotes:
ka04W000001484cQAA_0EM440000002BzJ.jpeg


Select "column#", "column$", "column_1", "column_2", "column;" from LU_day;

2. After escaping the special characters, the SQL is shown in SQL view of the report:

ka04W000001484cQAA_0EM440000002BzM.jpeg

Comment

0 comments

Details

Knowledge Article

Published:

May 30, 2017

Last Updated:

May 30, 2017