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

KB43005: "invalid relational operator" error message appears when executing a report with Case syntax defined in ApplySimple function in the attribute form expression in MicroStrategy against Oracle database.


Community Admin

• Strategy


SYMPTOM:
 
"invalid relational operator" error message appears when executing a report with Case syntax defined in ApplySimple function in the attribute form expression in Strategy against Oracle database as shown below:
 
 

ka04W000000Oh03QAC_0EM440000002JE4.png

QueryEngine encountered error: Execute Query failed. Error type: Odbc error. Odbc operation attempted: SQLExecDirect. ORA-00920: invalid relational operator Connection String: DSN=XXX; UID=YYY;
 
The following steps demonstrate how to reproduce the issue in tutorial project:
 

  1. Create a table with integer column "COL1" in Oracle 10g R2 data warehouse and insert two values 1907 and 1908 for COL1.
  2. Import the table into project and create attribute Col1 with ID form mapping to this column.
  3. ID from has expression as shown below:
ka04W000000Oh03QAC_0EM440000002JE1.png

 
 
ApplySimple("Case when #0 1907 then 'Daily' else 'Weekly' END", ) 
 
 

  • Create and execute report with this attribute. Error message appears as shown below:
ka04W000000Oh03QAC_0EM440000002JE4.png

 
QueryEngine encountered error: Execute Query failed. Error type: Odbc error. Odbc operation attempted: SQLExecDirect. ORA-00920: invalid relational operator Connection String: DSN=XXX; UID=YYY; 
 
 
CAUSE:
 
The cause for this issue is that equal sign "=" is lost in the syntax of Case function.
 
ACTION:
 
Add equal sign to get the correct syntax of Oracle Case function in ApplySimple function as shown below:
 
 
ApplySimple("Case when #0=1907 then 'Daily' else 'Weekly' END", )
 
After updating schema, the report works fine as shown below:
 
 

ka04W000000Oh03QAC_0EM440000002JE2.png

 
 
 
 
 
 
 
 


Comment

0 comments

Details

Knowledge Article

Published:

June 6, 2017

Last Updated:

June 6, 2017