Ok, I figured out how to do the comma (-s, -W)
sqlcmd -S myServer -d myDB -s , -W -Q "SELECT Ticker [Ticker], DataValue [Eqy_out] FROM myTab WHERE AsOfDate <= 'Oct 2 2008 12:00AM' AND ValidToDate >= 'Oct 2 2008 12:00AM' AND Field = 'EQY_SH_OUT'" -o e:\tmp\myFile.csv
But the file looks like this:
Ticker,EQY_SH_OUT
------,----------
EVG CN,79.908730
FSY CN,77.085230
Which I don't want... how do I fix the header so that it doesn't put the comma between the column names and no dashed line?
Thanks