I'm trying export my results using xp_cmdshell
but I recive this error :
"Sqlcmd: error: error while opening or using file (my_path)".
This is what I've wrote on sqlserver:
exec xp_cmdshell 'sqlcmd -S my_server -d my_db -E -Q "my_query" -s "," -o "my_path"'
.
I've tried using command line and on it my instructions works.
I think its can be an permissions trouble but I'm new on this type of things and I can't solve by myself. I hope that some of you can help me, thanks