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

KB36007: Column with lower case column name in DB2 warehouse is enclosed by double quotes in SQL generation in MicroStrategy SQL Engine


Community Admin

• Strategy


This article describes a situation where lower case column names get surrounding double quotes in MicroStrategy

SYMPTOM:
In Strategy, the columns with lower case column names are enclosed by double quotes in SQL generation against a DB2 warehouse. For example, in the following report SQL, the supplier_id column is enclosed by double quotes
 


SELECT "supplier_id" FROM SUPPLIER 

 
In some user's environment, the above SQL cannot be executed against the DB2 warehouse and the following error is received.
 

Query failed to execute. Execute Query failed.
Error type: Odbc error. Odbc operation attempted: SQLExecDirect. supplier_id NOT COLUMN OF INSERTED/UPDATED TABLE, OR ANY TABLE IN A FROM CLAUSE. For more information, please consult DB2 document for error code SQL0206. An error occurred during implicit system action type '2'. Information returned for the error includes SQLCODE '-206', SQLSTATE '42703' and message tokens 'supplier_id'.

 
CAUSE:
DB2 warehouse can be either case sensitive or case insensitive (depends on the collation sequence). For a case sensitive warehouse, the lowercase column needs to be enclosed by the quotes to be able to execute correctly. For case insensitive databases, the quotes will not help and occasionally generate errors in execution.
 
ACTION:
Contact Strategy Technical Support for further assistance on this issue. 
WORKAROUND:
Change the column read SQL to include an upper string function around the column name so all column names are brought into Strategy as upper case.
 
 


Comment

0 comments

Details

Knowledge Article

Published:

May 10, 2017

Last Updated:

May 10, 2017