When using SQL Server (2005, 2008) "Save Results As ..." option, I get CSV, but SQL Server does not do what I consider to be the correct CSV creation.
In particular, if my data contains commas, these fields are not wrapped in double quotes. The specific dataset that I am looking at right now does not contain double-quoted fields, but if so, I’m not sure if SQL Server will do it correctly either.
Every week I have to run a query in a database on a remote server that generates about 36 thousand rows, and I need to return it to someone in my office in CSV format. So far I have copied the data and then pasted it into Excel (via Remote Desktop). But pasting 36k lines from a remote clipboard takes a lot of time. Excel provides all kinds of "Waiting for OLE operation to complete" messages when this happens.
I would rather just run the query, save the results as CSV on the most remote server, and then copy the file.
In the long run, I will write a process to do this automatically for me, but I have had this problem with SQL Server for many years, but the pain level has not been high enough for me to find a solution so far.
source
share