{"id":2910,"date":"2014-01-19T07:25:18","date_gmt":"2014-01-19T07:25:18","guid":{"rendered":"http:\/\/www.withdata.com\/blog\/?p=2910"},"modified":"2026-07-15T05:00:01","modified_gmt":"2026-07-15T05:00:01","slug":"export-sql-server-query-results-to-csv-file","status":"publish","type":"post","link":"https:\/\/www.withdata.com\/blog\/sqltotxt\/export-sql-server-query-results-to-csv-file.html","title":{"rendered":"Export SQL Server query results to CSV file"},"content":{"rendered":"<p>Want to export data from  <a href=\"https:\/\/www.microsoft.com\/en-us\/cloud-platform\/sql-server\">SQL Server<\/a>  query to  <a href=\"https:\/\/en.wikipedia.org\/wiki\/Comma-separated_values\">CSV<\/a>  file?<\/p>\n<p>Using <a href=\"https:\/\/www.withdata.com\/sqltotxt\/\">SqlToTxt<\/a>, you can export data from SQL Server query to Csv file easily and fast, just a few mouse clicks!<\/p>\n<p>Here you can <a href=\"https:\/\/www.withdata.com\/down\/SqlToTxt.exe\">download<\/a> and install <a href=\"https:\/\/www.withdata.com\/sqltotxt\/\">SqlToTxt<\/a>.<\/p>\n<h2>Export data from SQL Server query to Csv file<\/h2>\n<p> Click &#8220;Export From Query&#8221; at task dialog.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.withdata.com\/images\/dbtofile\/wizard-task.png\" ALT=\"Export data from SQL Server Query To Csv File - task window\" width=\"636\" height=\"457\" style=\"max-width:100%;height:auto;display:block;\"><\/p>\n<p>then show the Export Query form.<\/p>\n<p>1. Select Csv file type.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.withdata.com\/images\/dbtofile\/select-csv-type.png\" ALT=\"Export Query Results from SQL Server Table To Csv File - select Csv file type\" width=\"489\" height=\"200\" style=\"max-width:100%;height:auto;display:block;\"><\/p>\n<p>2. Enter query.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.withdata.com\/images\/dbtofile\/query-to-a-file-source.png\" ALT=\"Unload data from SQL Server Query ResultSet To Csv File - select table\" width=\"722\" height=\"572\" style=\"max-width:100%;height:auto;display:block;\" loading=\"lazy\" decoding=\"async\"><\/p>\n<p>3. Enter data file name.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.withdata.com\/images\/dbtofile\/query-to-csv-target.png\" ALT=\"Extract data from SQL Server Query Results To Csv File - enter file name\" width=\"722\" height=\"572\" style=\"max-width:100%;height:auto;display:block;\" loading=\"lazy\" decoding=\"async\"><\/p>\n<p>4. Summary.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.withdata.com\/images\/dbtofile\/query-to-csv-summary.png\" ALT=\"Convert data from SQL Server Query ResultSet To Csv File - summary\" width=\"722\" height=\"572\" style=\"max-width:100%;height:auto;display:block;\" loading=\"lazy\" decoding=\"async\"><\/p>\n<p>5. Export.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.withdata.com\/images\/dbtofile\/query-to-csv-convert.png\" ALT=\"Dump data from SQL Server SQL Query To Csv File - export\" width=\"722\" height=\"572\" style=\"max-width:100%;height:auto;display:block;\" loading=\"lazy\" decoding=\"async\"><\/p>\n<hr style=\"clear: both;\" \/>\n<p><a href=\"http:\/\/www.withdata.com\/sqltotxt\/\">More about SqlToTxt &#8211; the tool to export data from SQL Server query to Csv file<\/a><\/p>\n<div style=\"clear: both;\">\n<p>30-day free trial <a href=\"http:\/\/www.withdata.com\/down\/SqlToTxt.exe\"><img decoding=\"async\" src=\"http:\/\/www.withdata.com\/images\/btn_download_green.png\" alt=\"Download SqlToTxt\" width=\"165\" height=\"50\" style=\"max-width:100%;height:auto;\" loading=\"lazy\" decoding=\"async\" \/><\/a>US$59.95 <a href=\"http:\/\/www.withdata.com\/sqltotxt\/purchase.html\"><img decoding=\"async\" src=\"http:\/\/www.withdata.com\/images\/btn_buynow_green.png\" alt=\"Buy SqlToTxt\" width=\"154\" height=\"45\" style=\"max-width:100%;height:auto;\" loading=\"lazy\" decoding=\"async\" \/> <\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Want to export data from SQL Server query to CSV file? Using SqlToTxt, you can export data from SQL Server query to Csv file easily and fast, just a few mouse clicks! Here you can download and install SqlToTxt. Export data from SQL Server query to Csv file Click &#8220;Export From Query&#8221; at task dialog. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[65],"tags":[583,258,1339],"class_list":["post-2910","post","type-post","status-publish","format-standard","hentry","category-sqltotxt","tag-sql-server-query-results-export-to-csv","tag-sql-server-to-csv","tag-sqltotxt"],"_links":{"self":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts\/2910","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/comments?post=2910"}],"version-history":[{"count":7,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts\/2910\/revisions"}],"predecessor-version":[{"id":7474,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts\/2910\/revisions\/7474"}],"wp:attachment":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/media?parent=2910"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/categories?post=2910"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/tags?post=2910"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}