Having one instance of MSSQL Management Studio 2017 connect to two different SQL 2016 Servers. I run queries against a database on each server and save results as CSV to compare with WinMerge.
Problem: One query window saves the CSV with header row, the other query window saves the CSV without header row. I have to edit one file before comparing to get rid of the header row.
Anyone know why I get different results using one instance of Management Studio?
Have a look at this option in SSMS:

Make sure that option is checked then close the query window you are using that does not save column headers and open a new one. Run your query in the newly opened window and see if it now saves with column headers.
Note: the same option is available for Results to Text if you are not using Results to Grid.
@destination-data You got me on the right track. I restarted Management Studio and since then I get the save as results as specified in the options. Kinda embarrassing that I didn't think of restarting. Worked fine for days.
Added to mark this as answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With