SYMPTOM:
In Strategy it is possible to include custom SQL that will be added in specific locations by using VLDB properties editor. An example is using Pre or Post Report SQL property. After executing a report via VLDB properties which contains custom SQL, the following error occurs in Strategy Developer:
Error: SQL Generation Complete
QueryEngine encountered error: Execute Query failed. Error type: Odbc error. Odbc operation attempted: SQLExecDirect. ILLEGAL SYMBOL ;; VALID SYMBOLS ARE `, `session.ZZMQ00`)
Error in Process method of Component: QueryEngineServer, PROJECT, Job 74944, Error Code= -2147212544.
CAUSE:This error is the result of one of the custom SQL statements being terminated with a semicolon ';'. When the Strategy Intelligence Server runs each of the SQL passes against the database, it appends the correct delimiter, for the database type listed in the database instance, to the end of each SQL statement. Since Strategy, by design, does not check to see if the SQL pass already contains the correct delimiter, it will append another one to the end of the statement. When the database receives the SQL, it returns an error as it does not know how to handle the multiple delimiters at the end of the SQL statement.
ACTION:Check all of the custom SQL added to the report's VLDB properties. Ensure that the last line of any of the custom SQL passes does not have a terminating delimiter character.