Please, read the comment of RedDK and follow the link provided by Him:
RedDK wrote:
Possibly the -C option needs to be set. Specific codepage can be input, if its not ACP, OEM, or RAW. Isn't there a way to say it in TSQL also, using same keywords, somewhere in the " " string?
See http://technet.microsoft.com/en-us/library/ms162802.aspx[^]
and have a look
here[
^].
Instead:
xp_cmdshell bcp "select * from table1" QUERYOUT /c /t, -T -S
try to use:
xp_cmdshell bcp "select * from table1" QUERYOUT -w -t, -T -S
Do not forget to define codepage!