I am trying to export the results of a query to CSV and then ultimately Excel.
My issue is, one of my columns has commas in it and the commas interrupt Excel parsing the CSV in the correct places.
I don't have write privileges to the db, so dropping the query results into a table and then exporting that table to excel is not an option.
Is there a way to export to excel, or at least CSV with a column that has commas in it?
Launch SSMS and connect to the required database. 2. In Object Explorer, go to the database that you want to export to Excel. Invoke the shortcut menu and go to Tasks > Export Data.
Open SQL Server Management Studio and connect to the database. 2. Go to "Object Explorer", find the server database you want to export to Excel. Right-click on it and choose "Tasks" > "Export Data" to export table data in SQL.
1 Right click your DB in object explorer window, go to Tasks -> Export Data
2 Pick Sql Server native client as your source, put in your connection parameters
3 Pick Excel as your destination
4 On the next screen paste your select query
5 go through the remaining screens making sure things look correct
6 profit
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With