DECLARE @cmd VARCHAR(255) SET @cmd = 'bcp select * from TESTCONTROL where COUNTERID =1 out D:\Downloads\testing.xls -U sa -P sql123 -c' Exec xp_cmdshell @cmd EXEC sp_configure 'xp_cmdshell', 1
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)