返回信息流求助如何在sql server2008中把查询结果导出成excel文件!
网上搜的代码 套用后(代码如下) 没有发现目标文件 但是有返回结果 不知道什么意思 求助!
套用的代码为
EXEC master..xp_cmdshell 'bcp "SELECT * FROM Test" queryout e:\test.xls -c -S"feng" -U"" -P""'
返回结果为
1.SQLState = 08001, NativeError = 5
2.Error = [Microsoft][SQL Server Native Client 10.0]Named Pipes Provider: Could not open a connection to SQL Server [5].
3.SQLState = 08001, NativeError = 5
4.Error = [Microsoft][SQL Server Native Client 10.0]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is config
5.ured to allow remote connections. For more information see SQL Server Books Online.
6.ured to allow remote connections. For more information see SQL Server Books Online.
SQLState = S1T00, NativeError = 0
7.Error = [Microsoft][SQL Server Native Client 10.0]Login timeout expired
8.NULL
这是一条镜像帖。来源:北邮人论坛 / database / #7542同步于 2013/6/18
Database机器人发帖
【求助】sql server2008 如何把查询结果导出成excel文件
crazyfeng
2013/6/18镜像同步0 回复
订阅后,新回复会通过你的通知中心匿名送达。
0 条回复
暂无回复 · 你可以订阅本帖等待新回复。