In this example, is your custom SQL the "select * from Table 1" ?
Please find the updated and correct me if I am wrong.
Select Col1 from Table1(normal query)
How tableau send:
Col1, Col2 ---Custom Query
1 of 1 people found this helpful
OK, so I just checked this rather than guessing
I used the Access database called "Sample - Coffee Chain" (you get that on one of the training courses)
My custom SQL (just aliasing the table so that it was easier to spot):
select * from factTable A
Then I :
- started Performance Recorder
- dragged [Area Code] on to the view
- stopped Performance Recorder
- checked the generated SQL and got this :
SELECT [Custom SQL Query].[Area Code] AS [Area Code] FROM ( select * from factTable A ) [Custom SQL Query] GROUP BY [Custom SQL Query].[Area Code]
So that shows that the custom SQL is within the Tableau query.
Maybe you're at the same point I was when I started using Tableau, being "I know how to write SQL, I'll just do it myself" BUT ... it's much better to not write SQL and let Tableau write the SQL and do the query the way it wants to do. You do use Custom SQL when there's something in the database that Tableau just can't do/understand.
I hope that helps
Thank You for the reply.It helped.