SQL Server Management Studio - Grid Result Save As .CSV - How to output Text instead of UTF-16 (Unicode)
-
22-08-2019 - |
Question
In SQL Server Management Studio, can the Grid "Save As" be changed to write out an encoding that is Text instead of UTF-16?
When I right click a Result Grid in In SQL Server Management Studio, it allows for a Save As .CSV. Currently it saves the .CSV file encoded as UTF-16 (Unicode) but Excel does not open this format automatically (Excel prompts for a delimiter). To get around the prompt, I opened the file in SlickEdit and did a Save As "Text". Of course this is an extra step.
Solution
This answer applies if you're using Sql Server Management Studio for SQL 2005/2008.
On the "Save Results" form, the "Save" button has a small drop-down button at its right-hand end.
Click this and select "Save with Encoding". Select ANSI to get a single-byte character set.