Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL - "Save results as CSV" - use comma instead of Semi-Colon

Hey, i need to export a query result to a CSV, but i get a semi-colon as a delimiter.
I went to:

Tools - Options - Query Results - SQL Server - Results to Text 

and set

Output format: Custom delimiter  
Custom delimiter: ,

and i still get the semicolon. when i return to the options, the original configuration is set.

I'm using MS SQL Management Studio 2008.

Thanx for the help

like image 531
André Alçada Padez Avatar asked Jan 10 '11 22:01

André Alçada Padez


People also ask

How do you handle commas in data when exporting to a CSV file SQL?

Add a "text qualifier" in the export definition. The usual is double-quotes. Or use tabs instead of commas as the delimiter, if you can. .csv files work with either, in most cases. Can work with pipes (also called "vertical bar"; key above Enter on your keyboard, shift-backslash), too.

Does SQL require semi colon?

Semicolon after SQL Statements? Some database systems require a semicolon at the end of each SQL statement. Semicolon is the standard way to separate each SQL statement in database systems that allow more than one SQL statement to be executed in the same call to the server.

How do I save SQL results to CSV with headers?

Select your results by clicking in the top left corner, right click and select "Copy with Headers". Paste in excel. Done!


1 Answers

This one of the options that needs you to close that query window and open a new one before it takes effect.

like image 53
Thomas Rushton Avatar answered Sep 26 '22 06:09

Thomas Rushton