Home Forums SQL Server 2005 SQL Server 2005 General Discussion BCP Utility to output contents into CSV RE: BCP Utility to output contents into CSV
sqldriver
SSChampion
Points: 10440
More actions
May 23, 2013 at 9:08 am
#1617889
Wouldn't you have to do something like:
EXECUTE @RESULT = 'MASTER..xp_cmdshell '+ @sql +'_1, NO_OUTPUT'
or
SET @RESULT = EXECUTE MASTER..xp_cmdshell [sql]_1, NO_OUTPUT
set @result = replace(@result, '[sql]', '@sql')
exec @result