KNOWLEDGE BASE

Unable to run CTE (Common Table Expressions) When Using "With" Command


Published: 02 May 2014
Last Modified Date: 04 Oct 2017

Issue

When using the With command in custom SQL, a syntax error occurs. 

Environment

  • Tableau Desktop
  • Custom SQL connection

Cause

Tableau wraps all custom SQL with a Select statement. 

Additional Information

Writing or modifying specific Custom SQL queries to achieve a desired effect is outside the scope of Support. 

More information about this can be found in the following Community Idea: CTE compatibility with SQL Server.
 
Did this article resolve the issue?