标签:style cmd test exec log lock span sel file
SET @FilePath=‘D:\TEST.xls‘ SET @sql=‘bcp "SELECT * FROM XXX.dbo.XXX WITH(NOLOCK) WHERE XXX=‘‘XXX‘‘ AND XXX = ‘+@XXX+‘" QueryOut ‘+@FilePath+‘ -c -T ‘ EXEC master..xp_cmdshell @SQL
标签:style cmd test exec log lock span sel file
原文地址:http://www.cnblogs.com/blossomwei/p/6923046.html