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

KB11588: “Data type mismatch in criteria expression” error message appears when executing a report with the Date function used in one of the objects present on the MicroStrategy template.


Community Admin

• Strategy


This article describes an error “Data type mismatch in criteria expression” when executing a report with the Date function used in one of the objects present on the template.

SYMPTOM:
A user has an attribute defined as follows:
 
Date(DATE_ID)

ka04W000000OeFVQA0_0EM440000002Fl4.jpeg

 
When executing a report with this attribute, the user will receive the following error:
 
QueryEngine encountered error: Execute Query failed. Error type. Odbc error. Odbc operation attempted: SQLExecDirect. Data type mismatch in criteria expression.
CAUSE:
Compare the report's SQL generated which uses the DATEVALUE function for the Date(DATE_ID) attribute to the values stored for DATE_ID:
 

ka04W000000OeFVQA0_0EM440000002Fl5.jpeg


 
Notice there are NULL IDs for DATE_ID.
The native Microsoft Access function "DATEVALUE," into which Strategy converts its Date Function, can only accept the data type of a Timestamp, and is unable to process NULL values.
 
ACTION:
When receiving "Data type mismatch" errors such as these, always check to see into what native Database function Strategy converts its functions. Do this by viewing the SQL of the report to determine if there are any limits on the datatypes or values that the Database functions can handle.
 


Comment

0 comments

Details

Knowledge Article

Published:

June 12, 2017

Last Updated:

June 12, 2017