SQL2005 "Save results as" to ansi, not unicode

SQL2005 "Save results as" to ansi, not unicode

Post by QmFycn » Thu, 04 Sep 2008 20:48:00


I have a query developed in SQL2000 that is now on SQL2005. It is run daily
to a grid, where we use "save results as" to write the results to a csv file
for use in another system. The query works fine, but the output is now
Unicode instead of the (SQL2000) ANSI format. Unicode fails to import in the
external system. How can I get SQL2005 to write the same data format as did
SQL2000. Thanks, Barry
 
 
 

SQL2005 "Save results as" to ansi, not unicode

Post by Russell Fi » Thu, 04 Sep 2008 21:21:49

Barry,

One you supply the name for the save file, the Save button will become
active. You will notice it has a down arrow on the right side. Click on
that down arrow, choose Save With Encoding, and select Ansi instead of
Unicode.

RLF

 
 
 

SQL2005 "Save results as" to ansi, not unicode

Post by QmFycn » Fri, 05 Sep 2008 04:15:02

Russell,
That works great and I greatly appreciate the response. Do you know a way
to save this a a default or perhaps a better way to do this data extract. We
perform this process every day for 2 separate queries, so I'd like to find a
"goof-proof" process for our user. Thanks, again...
Barry
 
 
 

SQL2005 "Save results as" to ansi, not unicode

Post by Aaron Bert » Fri, 05 Sep 2008 05:10:34

> That works great and I greatly appreciate the response. Do you know a way

I asked for this. And even though it is marked as fixed, it is not fixed
the way I would like.

http://www.yqcomputer.com/
9


Are you going to do this manually forever? Who is going to do it when you
are sick, or on vacation, or get hit by a bus, or win the lottery and move
to your new island? Kidding aside, you should write a utility (command-line
C# app, VBS script, SSIS package, what have you) that will automate this and
allow it to run programmatically (without having to worry about remembering
to change a save as option), whether on a schedule or on demand (one click
is better and easier to goof-proof than 15).