I am trying to output a file, using bcp, that is PIPE delimited, and it keeps giving me syntax errors. The syntax I am using is:
exec master..xp_cmdshell 'BCP "select * from ##VENDORS" queryout C:\VENDORS.TXT -c -t \|'
It seems to be able to deal with it if I use \"|, but then it puts the doublequote before the pipe also.