日期:2014-05-18  浏览次数:20381 次

bcp导出数据时,报37000
SQL code
Declare @sql varchar(600),@count int
Create Table ##tempTable
(
postID int
)
insert into ##tempTable select postID from dbo.Post
set @sql='bcp ##tempTable out "E:\魔兽世界吧——数据\2012-3-14\Temp3.xls" 
-c -q -S"WHULCC-PC" -U"sa" -P"123123123"'
EXEC master..xp_cmdshell @sql
drop table ##tempTable





------解决方案--------------------
http://topic.csdn.net/u/20120317/15/343afa87-9497-46e7-8c65-5e4a0447e6ad.html?39733
------解决方案--------------------
SQL code
Declare @sql varchar(600),@count int
Create Table ##tempTable
(
postID int
)
insert into ##tempTable select postID from dbo.Post
set @sql='bcp tempdb..##tempTable out "E:\魔兽世界吧——数据\2012-3-14\Temp3.xls" 
-c -q -S"WHULCC-PC" -U"sa" -P"123123123"'
EXEC master..xp_cmdshell @sql
drop table ##tempTable