5 Replies Latest reply on Jun 13, 2017 8:38 AM by Jonathan Kawakami

    Custom SQL Joining multiple table

    Leo Kaplun

      I'm connecting to excel data source using legacy connection so that I can use custom SQL.

      Joining one table works, but when I try to join the second I keep getting 'syntax error'.

      Doesn't Tableau support multiple INNER JOINS?

       

      My SQL looks like this:

       

       

      SELECT DISTINCT *

      FROM

          [tbl1$] AS table1

          INNER JOIN

          [tbl2$] AS table2

          ON [table1].[ID] = [table2].[ID]

      INNER JOIN

        tbl3$] AS table3

        ON [table2].ObjectId = [table3].NewId

       

      Error:

      Database error 0x80040E14: Syntax error (missing operator) in query expression