日期:2014-05-17  浏览次数:20399 次

为什么我导不出EXCEL表
不知道为什么,就是导不出EXCEL,我的导出语句如下,请各位大侠多多提点,谢谢
EXEC master..xp_cmdshell 'bcp "SELECT * from test" queryout "c:\test.xls" /c -/S"local" /U"sa" -P"123456"'

------解决方案--------------------
引用:
在服务器端运行的,在查询分析器运行,提示output NULL,不知道怎么情况,不知道大家有没遇到这样的情况?

EXEC master..xp_cmdshell 'bcp "SELECT * from 库名.dbo.test" queryout "c:\test.xls" /c /S"(local)" /U"sa" -P"123456"'