Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL 2005 and DOS text 1

Status
Not open for further replies.

jjefferson

Technical User
Oct 8, 2001
98
US
Hi - Using Management Studio query to pull some data, then save the results as a tab-delimited text file for an old DOS program to process. Worked fine with the old Query Analyzer (still have that and am using as an interim workaround).

The problem is that Management Studio seems to be saving the text as Unicode instead of good ole ANSI text, and I can't find any setting in in the product to change the character encoding (only the delimiters). Of course, the old DOS program is choking on this file with double-byte characters, even if the first byte is always a chr(0).

QA had a pulldown in the Save As dialog for "file format", where you could choose unicode, ANSI, or OEM for the character encoding of the results. Nothing similar was found in any Management Studio menu or configuration option, though I could have missed it.

Thanks for any info. We'll be retiring the DOS app eventually but for now have to feed it 8-bit data.

- Jim -
 
I assume you are using Results -> To File

When the dialog box opens (where you select the folder and file name), there is a Save button in the lower right corner of the screen. At the far right edge of the save button, there is a little drop down arrow. Clicking the arrow gives 'Save With Encoding'.

Give that a try and see if it works ok for you.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
George - Thanks a million! Exactly what I needed and it solved the problem perfectly.

I can't believe I didn't see that arrow there (forest for the trees, I guess).

Thanks for this!

(red-faced) Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top