How to get export output in “real” CSV format in SQL Server Management Studio?

前端 未结 12 1010
梦谈多话
梦谈多话 2020-12-04 07:57

I have a query that I am running in SQL Server Management Studio (connecting to a SQL Server 2005 database). I want to export the data in CSV format. Not wannabe CSV format,

12条回答
  •  盖世英雄少女心
    2020-12-04 08:39

    As all the settings mentioned above didn't fix the CSV my SSMS (SQL Server 2014) generated and exporting a tab-separated file didn't make it any better, a colleague and me made a converter script (Ruby) to convert the SSMS CSV into readable CSV. It keeps encoding, separators and linebreaks of the original file and even does an exact-byte-match validation at the end (it creates a file in the SSMS format from the parsed (!) input file and compares both files).

    https://gist.github.com/gr8bit/62202ea89a7e3aff67df2ff080ee8e88

    Contact me on github if you encounter errors, please. Cheers!

提交回复
热议问题