I m trying to write query result to txt file. Here is my code:
exec master..xp_cmdshell 'bcp "select * from Leasings" queryout "DHCPLog.txt" -c -t,-T MyServerIP'
But the result is :
And there is no row in DHCPLog.txt. Do you have any suggestion about this?