title: How to export data as CSV format from SQL Server using sqlcmd?
body: <p>I can quite easily dump data into a text file such as:</p>
  
  <pre><code>sqlcmd -S myServer -d myDB -E -Q "select col1, col2, col3 from SomeTable" 
       -o "MyData.txt"
  </code></pre>
  
  <p>However, I have looked at the help files for <code>SQLCMD</code> but have not seen an option specifically for CSV. </p>
  
  <p>Is there a way to dump data from a table into a CSV text file using <code>SQLCMD</code>?</p>