sql生成excel

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

上一篇:sqlserver 脚本方式导出数据到excel


下一篇:Android 开源框架 ( 九 ) 图片加载框架---ImageLoader