I'm exporting records from a SQL server to a csv file.
sqlcmd -y0 -S server -d database -U username -P password -o C:\outfiles\data.csv -s ";" -Q "SET NOCOUNT ON; select field1, field2, field3 from tablex"
Which is working but the first row with the column headers is missing. Why is that?
I need the y0 flag or one very long varchar column is truncated.