Hacker News new | ask | show | jobs
by autokad 4228 days ago
I've been using MS SQL Server for over 10 years, including versions as early as 2000. I have extensively used CSVs in every version
1 comments

Then you're well aware of how broken MS SQL is when it comes to exporting CSVs where the delimiter is in one of the string fields or where a field has an EOL character, etc. PostgreSQL handles all of that with no problems whatsoever. MS SQL doesn't even attempt to follow RFC 4180.

I've actually written small wrapper scripts that feed a query into MS SQL, fetch the results row by row and--with a proper CSV writer (eg Python's csv, Perl's Text::CSV, etc), dump to file. It's relatively slow, but at least it works.