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

KB442580: "Syntax error" occurs after defining multiple joins and execute SQL using DB Impala in MicroStrategy 10.x and above


Community Admin

• Strategy


This issue has been classified as a defect by MicroStrategy. The impact is limited to MicroStrategy 10.x and above product only with Impala or Salesforce database using right heavy join. A solution is available in the current document. A code fix for this issue is not available in current releases but is being reviewed for a future MicroStrategy release.

SYMPTOM:
 

  • In Strategy 10.x and above, choose database "Impala", open build query, add 3 tables:

        T1: C_T1
        T2: C_T2
        T3: C_T3
Drag column "C_T2" and drop to "C_T3". Drag column "C_T1" and drop to "C_T2" as shown below:
 

ka04W000000OfPfQAK_0EM44000000RfWg.png

 
Double click "C_T1". Execute SQL gets below error:
        Encountered: IDENTIFIER Expected: SELECT, VALUES, WITH CAUSED BY: Exception: Syntax error
 
Check SQL is as below:
        SELECT T1.C_T1 C_T1
        FROM dbo.T1 T1
        JOIN (dbo.T2 T2 JOIN dbo.T3 T3
              ON (T2.C_T2 = T3.C_T3))
              ON (T1.C_T1 = T2.C_T2)
 
 

  • If database "Salesforce" is used, then gets below error:


         Unexpected token SFORCE, requires SELECT in statement
 
 
CAUSE:
 
Some databases (such as Impala and Salesforce) don't support right heavy tree like: T1 join (T2 join T3).
 
Currently join orders are defined by orders of manipulations and there is no optimization. When create joins with some specific orders, right heavy join tree might be generated.
 
ACTION:
 
Delete problematic joins and recreate them by dragging from left to right.
 
Drag column "C_T1" and drop to "C_T2". Drag column "C_T2" and drop to "C_T3" as shown below:

ka04W000000OfPfQAK_0EM44000000RfWb.png

 
 
Article Reference Number: KB442580


Comment

0 comments

Details

Knowledge Article

Published:

January 9, 2019

Last Updated:

January 9, 2019