SSMS 2016: Export query results to CSV, where fields are enclosed in delimiting quotes.

I have a missing quote line containing list separators when saving .csv results in SSMS 2016. It looks like this option was excluded in this version of SSMS.

I need to export the query results to a CSV file (i.e. a comma-separated file) - this is a UTF-8 / ASCII text file in which the entries are of variable length and end with a carriage return and a line feed. Fields are clearly separated by a comma. It is recommended that all fields be enclosed in delimiting quotes. Separated quotation marks are required for fields that must contain a comma-separated list of codes.

I can export the results to a CSV file, but it has no separation quotes. For example, I have the following output

Aguilar,F,03191970,H,700,699,240,S

which should be

Aguilar,F,03191970,H,"700,699,240",S

Not sure if there is a better way to do the same. Please advise.

+4
source share
1 answer

Today I faced the same problem after switching to a new laptop and installing the latest version of SSMS. I finished installing the old version of SSMS 2012 (11.0.6020.0) from the following URL:

0
source

Source: https://habr.com/ru/post/1667821/


All Articles