Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server Management Studio - Grid Result Save As .CSV - How to output Text instead of UTF-16 (Unicode)

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.

like image 359
Gerhard Weiss Avatar asked Apr 01 '09 18:04

Gerhard Weiss


1 Answers

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.

like image 153
Ed Harper Avatar answered Sep 23 '22 15:09

Ed Harper