Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mgmt Studio save results as issue

Tags:

sql

grid

I have a SQL query that returns 1 column. I run it in SQL Server Management Studio 2008R2. I use File\Save Grid Results and create a .TXT file.

My problem is the first record of the file has 3 bytes inserted in front of the data. They three bytes are x'EFBBBF'. This causes problem when I use the file in another process.

I get the same thing wheter I save as .TXT or as .CSV.

Any ideas?

like image 425
SBCUser666 Avatar asked Dec 21 '25 23:12

SBCUser666


1 Answers

Found it.

  1. Save Results As...
  2. Choose a folder
  3. Enter a file name
  4. Save button now has a dropdown arrow to the right
  5. Click on dropdown arrow and select Save with Encoding...
  6. Select ANSI
  7. Click OK

The ANSI-encoded file will not contain a UTF-8 BOM.

like image 162
SBCUser666 Avatar answered Dec 24 '25 16:12

SBCUser666



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!