Hi Mike – thanks for calling in on this. I thought I would post on the forum for everyone to see.
My initial thoughts.
The # sign for the temporary table seems to confuse JTDS driver. If I do a similar query with the ODBC driver:
FROM [Donations_&_Others] AS [Donations_&_Others]
It seems to work… in that I get a message of “no result set was produced” which makes sense since all this statement does is produce a temporary table.
The problem however is that now you need to run a new query to get the information out of the temp table. The current datalink functionality will not support multiple embedded sql statements. This is something we can consider for a future release.