The following code
EXEC master..xp_cmdshell 'bcp "SELECT * FROM dbo.authors" queryout "C:\bcptest.txt" -T -c -t,'
gives me the error:
Error = [Microsoft][SQL Native Client][SQL Server]Invalid object name 'dbo.authors'.
What is wrong with this code?
Thanks for helping.