title: Tableau - Common Table Expression (CTE) SQL Server
body: <p>I am connecting Tableau with SQL Server and I am trying to use the T-SQL query.
  I just want to know, does Tableau support CTE (Common Table Expression)?</p>
  
  <p>I came across this article and it said CTE is possible: <a href="http://kb.tableau.com/articles/howto/using-common-table-expressions" rel="nofollow noreferrer">http://kb.tableau.com/articles/howto/using-common-table-expressions</a></p>
  
  <p>Here's my query:</p>
  
  <pre><code>WITH Test (Store) AS 
  (
      SELECT 
          Store
      FROM
          FiscalReporting.dbo.LBR_STR_ORG
  )
  SELECT
      Store
  FROM
      Test
  </code></pre>
  
  <p>When I am running this query, I get an error message. Please let me know if I am doing something wrong. </p>
  
  <p>Most of my SQL queries are built with CTE. So it would be greatly appreciated if I get any help. Also, I am new to Tableau.</p>
  
  <p>Thanks!</p>