In my experience custom queries work as they would in their native environment. When I use custom queries from Ms SQL I basically will write the query in SSMS. Once I have a good starting point I will copy and paste it into Tabluea's Custom Query interface. I am then able to edit the query as needed in the Tableau Custom Query.
Here is more on Tableu Custom SQL Queries
If this helps please mark it helpful so that others may find answers quicker. Thanks!
I do not believe this is possible, at least it has not been in my experience. Maybe if you have a new version of SAS/ODBC drivers, but I personally do not think so (most of our data is currently stored in SAS).