Excel数据连接通过SMSS返回无结果[关闭](Excel Data Connection returns no results via SMSS [closed])

我在Excel 2010中使用Data Connections 大部分时间都没有问题,但偶尔通过Microsoft Query(通过SSMS)获取外部数据时,查询结果将在GUI中正常显示,但是当我单击导出到Excel时,“来自[数据库]的查询:获取数据...“将从获取数据部分中删除并且不返回任何结果。

它简单地说,“从[数据库名称]查询”。 有没有人之前有过这个问题,我该如何解决? 通常情况下,我只需重启我的电脑或稍后再试,它就能正常工作。 有任何想法吗?

I have no issues using Data Connections in Excel 2010 most of the time, but occasionally when I get external data via Microsoft Query (via SSMS), the query results will display fine in the GUI, but when I click export to Excel, The "Query from [database]:Getting Data..." will drop off the Getting Data part and return no results.

It simply says, "Query from [database name]". Has anyone had this issue before and how do I resolve it? Often times, I have to simply restart my PC or try again later, and it will work. Any ideas?

最满意答案

检查您的SSMS选项(工具|选项)以获取最大字符检索值 - 和 - 或 -

(之前的SSChampion发布)SSMS可以选择将查询结果直接保存到文件中,而不显示它(Control + Shift + F,然后执行查询); 这是您可能想要尝试的选项,只需将文件保存为.csv格式即可。

BCP.EXE out或sqlcmd是将大量数据操作到磁盘的更好选择。

Excel不是用于大量数据行的正确工具。 像这样的大文件应该用文本编辑器处理,比如NotePad ++或EditPlus而不是Excel。

It was because part of the script created messages (1 row inserted, etc.). I put "set nocount on;" at the top of the script which removes these messages, and I haven't had a problem since.

Excel数据连接通过SMSS返回无结果[关闭](Excel Data Connection returns no results via SMSS [closed])

我在Excel 2010中使用Data Connections 大部分时间都没有问题,但偶尔通过Microsoft Query(通过SSMS)获取外部数据时,查询结果将在GUI中正常显示,但是当我单击导出到Excel时,“来自[数据库]的查询:获取数据...“将从获取数据部分中删除并且不返回任何结果。

它简单地说,“从[数据库名称]查询”。 有没有人之前有过这个问题,我该如何解决? 通常情况下,我只需重启我的电脑或稍后再试,它就能正常工作。 有任何想法吗?

I have no issues using Data Connections in Excel 2010 most of the time, but occasionally when I get external data via Microsoft Query (via SSMS), the query results will display fine in the GUI, but when I click export to Excel, The "Query from [database]:Getting Data..." will drop off the Getting Data part and return no results.

It simply says, "Query from [database name]". Has anyone had this issue before and how do I resolve it? Often times, I have to simply restart my PC or try again later, and it will work. Any ideas?

最满意答案

检查您的SSMS选项(工具|选项)以获取最大字符检索值 - 和 - 或 -

(之前的SSChampion发布)SSMS可以选择将查询结果直接保存到文件中,而不显示它(Control + Shift + F,然后执行查询); 这是您可能想要尝试的选项,只需将文件保存为.csv格式即可。

BCP.EXE out或sqlcmd是将大量数据操作到磁盘的更好选择。

Excel不是用于大量数据行的正确工具。 像这样的大文件应该用文本编辑器处理,比如NotePad ++或EditPlus而不是Excel。

It was because part of the script created messages (1 row inserted, etc.). I put "set nocount on;" at the top of the script which removes these messages, and I haven't had a problem since.