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

KB18852: 'General error. setStmtType failed [S1000:0 on HSTMT] [DataDirect][ODBC Oracle Wire Protocol driver]Error in SQL Parser' error occurs when running a report in MicroStrategy Developer 9.x with ‘Pre/Post Statements’ enabled


Stefan Zepeda

Salesforce Solutions Architect • Strategy


SYMPTOM:
When running a report in Strategy Developer 9.x, one of the following errors occur:

ka02R000000kcYQQAY_0EM440000002EmI.jpeg


Error: QueryEngine encountered error: Execute Query failed: ODBC error. ODBC operation attempted: SQLExecDirect. General error. setStmtType failed Error in SQL Parser.

 


When running the SQL generated by the report directly against the warehouse, it runs successfully.

STEPS TO REPRODUCE:
Follow the steps below to reproduce this error in the Strategy Tutorial project:
NOTE: The warehouse must not be in a Microsoft Access database for the steps below to work. For this Tech Note, an Oracle data warehouse is used.

  1. In the Database Instance Manager, right click on the Database Instance used by the Strategy Tutorial Project (by default, this would be 'Tutorial Data') and select VLDB Properties.
  2. Navigate to 'Pre/Post Statements' and 'Report Pre Statement 1'.
  3. Uncheck the 'Use default inherited value' checkbox and add the following text to the text field:
    -- This is a comment
  4. Save and close.
  5. Disconnect and reconnect to the project source.
  6. Create any report and run it. The report will throw the error described above; however, it will generate SQL.
  7. If the SQL generated by the report is run against the warehouse using ODBC Test Tool, it will run successfully.

CAUSE:
This happens because the report pre statement is formed of only a comment and no other SQL statement, this will also happen for the other Pre/Post Statements.
This is working as expected. The SQL is correct, but the Query Engine's SQL parser expects the Pre/Post Statements to be complete SQL statements and not just comments.
ACTION:
Include a full statement in the Pre/Post Statement so that it can be parsed by the SQL Parser.
 


Comment

0 comments

Details

Knowledge Article

Published:

April 13, 2017

Last Updated:

April 13, 2017