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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embedded characters in output files???? 2

Status
Not open for further replies.

pms18066

Programmer
Jan 12, 2005
94
US
I do a lot of data mining and use SQL 2000 and the 2005 tools(we are upgrading currently). I have found that when exporting a resulting dataset to a file delimited by ANYTHING in SQL 2005, it embeds chars in the output.

I have output to column alligned and tried to import to a SAS tool. It found characters that did not show up in UltrEdit or Notepad. Also I uploaded a comma delimited file to the mainframe and found low level characters appeared between EAC character of data(not each column). When I do this same process in the 2000 tools everything looks normal as expected. Does anyone know whats causing this. Is this a setting in 2005 somewhere?
 
SQL 2005 defaults to outputting data in unicode format.

To change this (at least for a single query)...

Load the query in to a query window.
Click Query -> Results To -> Results To File
Run the query

A 'Save Results' window will appear. Navigate to the folder where you want to save the file. Give it a file name.

Now, look at the save button near the bottom right of the window. See that little 'down arrow' on the button. Click (AND HOLD) the mouse button. Click 'save with encoding'. Change the 'Available encodings:' to ANSI.



-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top