0

How to use temporary tables in MS Query in Excel? The queries is showing up okay in the preview, but then it is not inserted into the spreadsheet correctly.

user3853657
  • 239
  • 4
  • 13

1 Answers1

2

Great answer found:

Try adding "SET NOCOUNT ON" at the beginning of your query. The temp-table handling queries may return null-recordsets, the first of which is being processed by MS Query (MS Query can only handle the first returned resultset). By using "SET NOCOUNT ON", you tell SQL Server not to send these null-recordsets.

http://objectmix.com/ado-dao-rdo-rds/60438-re-ms-query-temp-tables.html

user3853657
  • 239
  • 4
  • 13