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

前端 未结 12 971
梦谈多话
梦谈多话 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:44

    I know of no way to do this with SSMS alone. I know TOAD (http://www.toadworld.com/) has a CSV option. Not sure if it is an escaped format. If SSIS is an option, you can convert to a format that escapes strings (true CSV), but that is not in SSMS.

    If you have to write a C# program, I would consider querying the table and then running the query, as the metadata will clue which need the escape.

提交回复
热议问题