Column headers missing

22 Views Asked by At

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.

0

There are 0 best solutions below