Exporting SQL Server table to CSV issue commas, tabs and quotes

Posted by cyberpine on Stack Overflow See other posts from Stack Overflow or by cyberpine
Published on 2012-04-13T17:12:08Z Indexed on 2012/04/13 17:29 UTC
Read the original article Hit count: 344

Filed under:
|
|
|

After we export to flat file CSV, columns with commas, quotes and tabs cause problems in Excel. The vendor needs to read the file in Excel to make manual changes and then needs it in a flat file format CSV format to load using PL/SQL into an Oracle table.

I can remove those characters from the table in SQL Server, but is there a smarter way? Does it make sense to save to CSV when done in Excel and will that cause problems when attempting to load the file into Oracle anyway?

Also, we need the first row to have column names.. any SQL way to generate all the files in one swoop (the the tiles in the first row) rather than using export to flat file?

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about excel