首页 > 数据库技术 > 详细

sql生成excel

时间:2014-10-11 13:05:26      阅读:255      评论:0      收藏:0      [点我收藏+]

go
sp_configure ‘show advanced options‘,1
reconfigure
go
sp_configure ‘xp_cmdshell‘,1
reconfigure
go
EXEC master..xp_cmdshell ‘bcp "SELECT * FROM TestDB.dbo.Test " queryout "c:\test.xls" -c -q -S. -U"sa" -P"go@1014903"‘
GO
sp_configure ‘xp_cmdshell‘,0
reconfigure

EXEC master..xp_cmdshell ‘bcp "SELECT * FROM TestDB.dbo.Test " queryout "c:\test.xls" -c -q -S. -U"sa" -P"go@1014903"‘

sql生成excel

原文:http://www.cnblogs.com/byxxw/p/4018674.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!