title: BCP command adding new line character for the data having xml characters(<,>,\) while exporting data to CSV in sql server
body: <p>This is the BCP command I am using to export the data into CSV file in SQL server 2008:</p>
  
  <pre><code>EXEC master..xp_cmdshell 'BCP "exec ESB_ADT_DB.dbo.ProcTest" queryout "D:\outputfile.csv" -q -T -w -t,'
  </code></pre>
  
  <p>The problem is in table one column contains xml character (&lt;,>,) for this data it's adding new line characters after writing to the file. How can I stop the bcp command to add new line characters to the data written into the file.</p>
  
  <p>Thanks in advance for Help.</p>