Ariel welcome to the forums! Here's your SQL:
SELECT "table1"."field1" AS "field 1",
"table1"."field2" AS "field 2",
"table2"."field1" AS "table2_field1"
FROM "DB1"."TABLE1" "table1"
Assuming a MS SQL flavor of SQL I think your query will be:
SELECT table1.field1 AS [field 1]
, table1.field2 AS [field 2]
, table2.field1 AS table2_field1
FROM DB1.TABLE1 table1
But you are calling a field from a table2 table that you're not defining, so even this will fail. Comment that one out and see if it runs.
Let me try to be more clear.
The query works with the quotations.
The focus point here is that Tableau is generating those quotation marks when you try to convert the connection query to a custom SQL one by using Tableau's Convert to Custom SQL feature in the Connect to Data window.
Sorry, I'm still unclear as to what it is you are trying to accomplish? Maybe someone else gets what you are after.
You can concatenate the fields after pulling the data into Tableau - what resources were you looking at that showed field concatenation in Custom SQL (only asking so I can try to understand what you're basing your information on -- if you've been using specific links or threads to guide you, just include those links within this thread somewhere)? Basically, I am looking for what you're referring to when you stated:
3. Accordingly with Help info and some other folks in the forum the correct syntax is [field1]+" "+[field2], assuming i need a single space between the two fields, but changing to brackets doesn't work either.
My guess is that whatever you were looking at was referring to concatenating two String fields inside Tableau, AFTER connecting to data. The syntax above would work inside a Calculated Field; I'm not sure about doing the same inside Custom SQL. If you can provide the source of the info you were looking at, we can try to understand what you meant and whether the resource/link was referring to Custom SQL or a Calculated Field.
I'm not a Custom SQL guru, so I don't fully understand the issue you're trying to explain, but if concatenating the fields after pulling the data into Tableau solves your issue, then go for it.
I, too, do not understand the observation you are making about added quotation marks. Its not clear for me, based on the screenshot and info provided thus far, but again, I'm not a Custom SQL expert.
Hope this helps.