{"id":14349,"date":"2022-09-09T07:20:00","date_gmt":"2022-09-09T05:20:00","guid":{"rendered":"https:\/\/expert-only.com\/?p=14349"},"modified":"2023-05-15T13:16:34","modified_gmt":"2023-05-15T11:16:34","slug":"export-sql-data-in-csv-with-ssis","status":"publish","type":"post","link":"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/","title":{"rendered":"Export SQL Server data into a CSV file with SSIS"},"content":{"rendered":"\n<h4 class=\"has-text-align-center wp-block-heading\" id=\"h-export-data-from-a-sql-server-table-to-a-text-file-in-csv-format-with-an-ssis-package\"><strong><em>Export data from a SQL Server table to a text file in CSV format with an SSIS package.<\/em><\/strong><\/h4>\n\n\n\n<p>This tutorial explains how to export the SQL Server data into a CSV file with SSIS. The export here is in CSV format, and SSIS offers many other options. SSIS has been one of the leaders in the field of ETL and data integration for many years, having been on the IT market for decades and being recognized by large companies. In the <a href=\"https:\/\/www.informatica.com\/blogs\/we-are-a-leader-in-the-2022-gartner-magic-quadrant-for-data-integration-tools-for-the-17th-time.html\" target=\"_blank\" rel=\"noreferrer noopener\">2022 Magic Quadrant for Data Integration Tools<\/a>, Informatica is the overall leader and Microsoft SSIS is still in the leaders section. <\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/#ssis-tutorial-to-export-sql-server-data-into-a-csv-file\" >SSIS tutorial to export SQL Server data into a CSV file<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/#1-prepare-the-sql-server-table-to-export-in-csv\" >1. Prepare the SQL Server table to export in CSV<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/#2-create-the-ssis-package-and-the-data-flow\" >2. Create the SSIS package and the data flow<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/#3-configure-the-sql-server-source-table-with-ole-db\" >3. Configure the SQL Server source table with OLE DB<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/#4-set-up-the-ssis-connection-to-the-csv-file\" >4. Set up the SSIS connection to the CSV file<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/#5-configure-the-target-columns-to-export-in-csv\" >5. Configure the target columns to export in CSV<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/#6-run-the-ssis-package-and-check-the-csv-data\" >6. Run the SSIS package and check the CSV data<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/#conclusion-on-sql-server-data-export-to-csv-with-ssis\" >Conclusion on SQL Server data export to CSV with SSIS<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"ssis-tutorial-to-export-sql-server-data-into-a-csv-file\"><\/span>SSIS tutorial to export SQL Server data into a CSV file<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Along with importing, exporting data is one of the classic tasks. This allows, for example, to provide updated data for another application. And thus to communicate throughout the company. A basic SSIS data export package consists of four main structuring elements:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>A control flow containing: <ul><li>A data flow, itself containing:<ul><li>An OLE DB Source component for the data source, a SQL Server table.<\/li><li>A Flat File Destination component for the export target, a CSV file.<\/li><\/ul><\/li><\/ul><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1-prepare-the-sql-server-table-to-export-in-csv\"><\/span>1. Prepare the SQL Server table to export in CSV<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>With SSMS, create the customer table. Then insert the following 24 rows into the table to export. This basic example dataset is used to run the package with a practical result. The goal is to successfully export this SQL Server sample data into a CSV file with a simple SSIS package, by following exactly those steps, and after to adapt the methodology to another package.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"mssql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">-- Create the customer's table\nCREATE TABLE [dbo].[Customers](\n   [CustomerID] [int] NOT NULL,\n   [FirstName] [nvarchar](20) NULL,\n   [LastName] [nvarchar](20) NULL,\n   [City] [nvarchar](20) NULL,\n   [Country] [nvarchar](50) NULL,\n   CONSTRAINT [CustomersPrimaryKeyCustomerID] PRIMARY KEY CLUSTERED ([CustomerID] ASC)\n);\nGO\n\n-- Insert 24 rows with customer data\nINSERT INTO [dbo].[Customers] VALUES (1, N'Ali', N'Ahmed', N'Cairo', N'Egypt');\nINSERT INTO [dbo].[Customers] VALUES (2, N'Johnny', N'John', N'Toronto', N'Canada');\nINSERT INTO [dbo].[Customers] VALUES (3, N'John', N'Doe', N'Mexico City', N'Mexico');\nINSERT INTO [dbo].[Customers] VALUES (4, N'Shu', N'Abbas', N'Paris', N'France');\nINSERT INTO [dbo].[Customers] VALUES (5, N'Jeane', N'Raffin', N'Liushutun', N'China');\nINSERT INTO [dbo].[Customers] VALUES (6, N'Legra', N'Leate', N'B\u0142aszki', N'Poland');\nINSERT INTO [dbo].[Customers] VALUES (7, N'Sullivan', N'Goadby', N'Xiaoguwei', N'China');\nINSERT INTO [dbo].[Customers] VALUES (8, N'Tom', N'Ellams', N'Lop Buri', N'Thailand');\nINSERT INTO [dbo].[Customers] VALUES (9, N'Trace', N'Fowell', N'Sriwing', N'Indonesia');\nINSERT INTO [dbo].[Customers] VALUES (10, N'Christoffer', N'Rochford', N'Mburukullu', N'Indonesia');\nINSERT INTO [dbo].[Customers] VALUES (11, N'Dru', N'Dunridge', N'Mistrat\u00f3', N'Colombia');\nINSERT INTO [dbo].[Customers] VALUES (12, N'Dud', N'Gravenor', N'Sandaogou', N'China');\nINSERT INTO [dbo].[Customers] VALUES (13, N'Lori', N'Garshore', N'Jeziora Wielkie', N'Poland');\nINSERT INTO [dbo].[Customers] VALUES (14, N'Cordy', N'Kentish', N'Vydreno', N'Russia');\nINSERT INTO [dbo].[Customers] VALUES (15, N'Ancell', N'Wileman', N'Claresholm', N'Canada');\nINSERT INTO [dbo].[Customers] VALUES (16, N'Elsworth', N'Chantrell', N'Sumberjo', N'Indonesia');\nINSERT INTO [dbo].[Customers] VALUES (17, N'Beverly', N'Giraudy', N'Cigembong', N'Indonesia');\nINSERT INTO [dbo].[Customers] VALUES (18, N'Tamas', N'Zavattiero', N'Jangkat', N'Indonesia');\nINSERT INTO [dbo].[Customers] VALUES (19, N'Benedick', N'Schaffler', N'Itaparica', N'Brazil');\nINSERT INTO [dbo].[Customers] VALUES (20, N'Leonard', N'Brimman', N'Moscow', N'Russia');\nINSERT INTO [dbo].[Customers] VALUES (21, N'Morton', N'Capelle', N'Uk', N'Russia');\nINSERT INTO [dbo].[Customers] VALUES (22, N'Larissa', N'Rawle', N'Tembayangan Barat', N'Indonesia');\nINSERT INTO [dbo].[Customers] VALUES (23, N'Karalee', N'Wall', N'Clifden', N'Ireland');\nINSERT INTO [dbo].[Customers] VALUES (24, N'Miller', N'Shakesbye', N'Gongnong', N'China');<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"760\" height=\"520\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-1-create-table-insert-data-1.jpg\" alt=\"Create the SQL Server table and insert the data to export into the CSV file with SSIS\" class=\"wp-image-12477\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-1-create-table-insert-data-1.jpg 760w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-1-create-table-insert-data-1-300x205.jpg 300w\" sizes=\"auto, (max-width: 760px) 100vw, 760px\" \/><figcaption>Create the SQL Server table and insert the data to export into the CSV file with SSIS<\/figcaption><\/figure><\/div>\n\n\n<p>Check that all 24 rows are present in the database with a simple select query or a count with the COUNT aggregation function.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"mssql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">SELECT COUNT(*) AS [LINES]\n  FROM [dbo].[Customers];<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"240\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-2-check-data-1.jpg\" alt=\"Check the number of rows inserted in the customer's table\" class=\"wp-image-12481\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-2-check-data-1.jpg 600w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-2-check-data-1-300x120.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption><br>Check the number of rows inserted in the customer&#8217;s table<\/figcaption><\/figure><\/div>\n\n\n<p>Also run a <a href=\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-insert-into-from-a-select\/\">selection SQL query<\/a> to check the rows and their consistency.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"mssql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">SELECT *\nFROM [dbo].[Customers];<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2-create-the-ssis-package-and-the-data-flow\"><\/span>2. Create the SSIS package and the data flow<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>First, <a href=\"https:\/\/expert-only.com\/en\/ssis\/create-ssis-project-visual-studio-2019\/\">open Visual Studio and create a new SSIS project<\/a>. Then open an existing package or create a new one. Then, from the <em>SSIS Toolbox<\/em>, select <em><a href=\"https:\/\/expert-only.com\/en\/ssis\/create-a-simple-ssis-data-flow\/\">Data flow Task<\/a><\/em> and drag it into the workspace and double click it.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"729\" height=\"685\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/add-ssis-data-flow-to-control-flow.jpg\" alt=\"Adding an export data flow to the SSIS package\" class=\"wp-image-11381\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/add-ssis-data-flow-to-control-flow.jpg 729w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/add-ssis-data-flow-to-control-flow-300x282.jpg 300w\" sizes=\"auto, (max-width: 729px) 100vw, 729px\" \/><figcaption>Adding an export data flow to the SSIS package<\/figcaption><\/figure><\/div>\n\n\n<p>Now, from the <em>Data Flow<\/em> tab, select the SSIS <em>OLE DB Source<\/em> component. Indeed, to export from a SQL Server database, it is the one recommended in this case. Also select the <em>Flat File Destination<\/em> component and drag it onto the workspace. In this case, it is a CSV file export, in a specific directory.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"580\" height=\"600\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-3-add-ole-db-source-flat-file-destination-1.jpg\" alt=\"Add the OLE DB Source and Flat File Destination to the SSIS Data Flow to export SQL Server data into a CSV file\" class=\"wp-image-12486\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-3-add-ole-db-source-flat-file-destination-1.jpg 580w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-3-add-ole-db-source-flat-file-destination-1-290x300.jpg 290w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><figcaption>Add the OLE DB Source and Flat File Destination to the SSIS Data Flow<\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3-configure-the-sql-server-source-table-with-ole-db\"><\/span>3. Configure the SQL Server source table with OLE DB<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Use an existing one or <a href=\"https:\/\/expert-only.com\/en\/ssis\/create-a-connection-to-sql-server-database-in-ssis\/\">create a new database connection with the SSIS connection manager<\/a>. Then select the connection.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"674\" height=\"641\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-4-configure-ole-db-connection-1.jpg\" alt=\"Use an existing connection or create a new one with the SSIS connection manager\" class=\"wp-image-12491\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-4-configure-ole-db-connection-1.jpg 674w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-4-configure-ole-db-connection-1-300x285.jpg 300w\" sizes=\"auto, (max-width: 674px) 100vw, 674px\" \/><figcaption>Use an existing connection or create a new one<\/figcaption><\/figure><\/div>\n\n\n<p>In the OLE DB Source Editor window, select the SQL Server database and table to export to the text file with SSIS: <strong><em>dbo.Customers<\/em><\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"858\" height=\"844\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-5-select-table-1.jpg\" alt=\"Select the connection and the customers table to export\" class=\"wp-image-12495\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-5-select-table-1.jpg 858w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-5-select-table-1-300x295.jpg 300w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-5-select-table-1-768x755.jpg 768w\" sizes=\"auto, (max-width: 858px) 100vw, 858px\" \/><figcaption>Select the connection and the customers table to export<\/figcaption><\/figure><\/div>\n\n\n<p>Click on the view button to check the data for export.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"525\" height=\"540\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-6-preview-table.jpg\" alt=\"Preview and check the data to be exported\" class=\"wp-image-12505\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-6-preview-table.jpg 525w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-6-preview-table-292x300.jpg 292w\" sizes=\"auto, (max-width: 525px) 100vw, 525px\" \/><figcaption>Preview and check the data to be exported<\/figcaption><\/figure><\/div>\n\n\n<p>Then link the <em>OLE DB Source<\/em> component with the <em>Flat File Destination<\/em> component with the arrow.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"460\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-7-link-source-to-targert.jpg\" alt=\"Link the database source with the file destination\" class=\"wp-image-12501\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-7-link-source-to-targert.jpg 600w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-7-link-source-to-targert-300x230.jpg 300w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-7-link-source-to-targert-80x60.jpg 80w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption>Link the database source with the file destination<\/figcaption><\/figure><\/div>\n\n\n<p>Once the SQL Server source table is configured, the second part of the tutorial is to link the two SSIS components and configure the output file with CSV format.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4-set-up-the-ssis-connection-to-the-csv-file\"><\/span>4. Set up the SSIS connection to the CSV file <span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Create a new destination flat file connection with the graphical editor, follow these steps. First, open the <em>Flat File Destination Editor<\/em> with a <strong>right-click<\/strong> on the component.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"858\" height=\"895\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-7-new-flat-file.jpg\" alt=\"Create a new flat file connection with CSV format\" class=\"wp-image-12512\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-7-new-flat-file.jpg 858w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-7-new-flat-file-288x300.jpg 288w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-7-new-flat-file-768x801.jpg 768w\" sizes=\"auto, (max-width: 858px) 100vw, 858px\" \/><figcaption>Create a new flat file connection with CSV format<\/figcaption><\/figure><\/div>\n\n\n<p>Choose the format of the destination flat file type with a <strong>Delimited<\/strong> format, i.e., the columns are separated by a separator. The semi-colon is widely used in <a href=\"https:\/\/www.stitchdata.com\/data-integration\/\" target=\"_blank\" rel=\"noreferrer noopener\">data integration projects<\/a>, because in typical business columns like First Name, Last Name, address, company, it is not used frequently.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"634\" height=\"481\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-8-delimited-format.jpg\" alt=\"Choose the delimited file format\" class=\"wp-image-12517\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-8-delimited-format.jpg 634w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-8-delimited-format-300x228.jpg 300w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-8-delimited-format-80x60.jpg 80w\" sizes=\"auto, (max-width: 634px) 100vw, 634px\" \/><figcaption>Choose the delimited file format<\/figcaption><\/figure><\/div>\n\n\n<p>Now select the type of file in which to export the data, in this case a flat file with a CSV extension. Set the following items. <\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>The name of the connection to the text file: <strong><em>Customers_Export.csv<\/em><\/strong><\/li><li>The full path of the file: <strong><em>C:\\data\\Customers_Export.csv<\/em><\/strong><\/li><li>The encoding of the file: <strong><em>65001 (UTF-8)<\/em><\/strong> to handle the special characters contained in the table<\/li><li>Check the header delimiter: <strong><em>{CR}{LF}<\/em><\/strong><\/li><\/ol>\n\n\n\n<p>Of course, in a particular project environment, these settings depends on your region and me adapted to a real world scenario.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"740\" height=\"714\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-9-configure-csv-file.jpg\" alt=\"Configure the SSIS connection to the target CSV file to export SQL Server data \" class=\"wp-image-12521\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-9-configure-csv-file.jpg 740w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-9-configure-csv-file-300x289.jpg 300w\" sizes=\"auto, (max-width: 740px) 100vw, 740px\" \/><figcaption>Configure the SSIS connection to the target CSV export file<\/figcaption><\/figure><\/div>\n\n\n<p>For the file name, from the General tab. Click <strong><em>Browse<\/em><\/strong> and choose the location of the text file to be exported with SSIS. If it does not exist, simply enter a path and the Integration Services package will create the file when the package is run.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5-configure-the-target-columns-to-export-in-csv\"><\/span>5. Configure the target columns to export in CSV<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Then click on the Columns tab and choose the delimiter type for the columns and rows.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Select the <em>Columns<\/em> tab.<\/li><li>Choose the <em>Column delimiter<\/em> as a semicolon: <strong>;<\/strong><\/li><li><em>Check<\/em> the column names.<\/li><\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"740\" height=\"714\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-10-semicolon-delimiter.jpg\" alt=\"Choose row and column delimiters of the file to export with SSIS\" class=\"wp-image-12537\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-10-semicolon-delimiter.jpg 740w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-10-semicolon-delimiter-300x289.jpg 300w\" sizes=\"auto, (max-width: 740px) 100vw, 740px\" \/><figcaption>Choose row and column delimiters of the file to export<\/figcaption><\/figure><\/div>\n\n\n<p>Check now the columns mapping. By default, SSIS automatically maps the source with the target columns. Indeed, for the text file, it creates columns of the same type, length, and name as the source.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"858\" height=\"844\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-11-check-mapping.jpg\" alt=\"Check the mapping between the SQL table to export and the text file\" class=\"wp-image-12544\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-11-check-mapping.jpg 858w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-11-check-mapping-300x295.jpg 300w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-11-check-mapping-768x755.jpg 768w\" sizes=\"auto, (max-width: 858px) 100vw, 858px\" \/><figcaption>Check the mapping between the SQL table to export and the text file<\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"6-run-the-ssis-package-and-check-the-csv-data\"><\/span>6. Run the SSIS package and check the CSV data<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Now run the data export package with the <em><strong>Execute<\/strong><\/em> button on the top menu. Or press <strong><em>F5<\/em><\/strong>, check beforehand that the package is defined as a start object in the project settings. The data export then starts from the source table to the target text file in CSV format. 24 rows are exported successfully.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"560\" height=\"440\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-12-execute-package-success.jpg\" alt=\"Run the SSIS package to export the SQL data into the CSV file\" class=\"wp-image-12549\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-12-execute-package-success.jpg 560w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-12-execute-package-success-300x236.jpg 300w\" sizes=\"auto, (max-width: 560px) 100vw, 560px\" \/><figcaption>Run the SSIS package to export the SQL data into the CSV file<\/figcaption><\/figure><\/div>\n\n\n<p>After execution, the customer table data stored in the SQL Server database is exported and available as a text file. Now open the file and check the result and the consistency of the data between the table and the file.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-13-check-exported-file.jpg\" alt=\"CSV data file exported from SQL Server data with SSIS\" class=\"wp-image-12558\" width=\"700\" height=\"820\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-13-check-exported-file.jpg 700w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-export-table-to-csv-file-13-check-exported-file-256x300.jpg 256w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><figcaption>CSV result file exported with SSIS<\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"conclusion-on-sql-server-data-export-to-csv-with-ssis\"><\/span>Conclusion on SQL Server data export to CSV with SSIS<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Finally, this SSIS tutorial explains how to create an SSIS package to export an MS SQL table to a text file, in CSV format, delimited by a semicolon. If the data is prepared in advanced with the proper data types and column names, SSIS makes the task much easier as the mapping is automatic, and the export management is quite ergonomic.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Tutorials about data import and export with SSIS<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/expert-only.com\/en\/ssis\/import-xml-file-into-a-table-with-ssis\/\">Import XML documents into SQL Server with SSIS<\/a><\/li><li><a href=\"https:\/\/expert-only.com\/en\/ssis\/import-multiple-text-files-with-ssis\/\">Load multiple CSV files into a SQL table with SSIS<\/a><\/li><li><a href=\"https:\/\/expert-only.com\/en\/ssis\/import-excel-file-into-sql-table-with-ssis\/\">Import Excel data into SQL Server with SSIS<\/a><\/li><\/ul>\n\n\n\n<p>The following SSIS tutorial explains how to do the reverse operation, i.e., import a CSV file into SQL Server table with SSIS.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-expert-only wp-block-embed-expert-only\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"GhQIBbecpx\"><a href=\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/\">Import CSV file into SQL Server using SSIS<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Import CSV file into SQL Server using SSIS&#8221; &#8212; SQL and IT Tutorials\" src=\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/embed\/#?secret=l3s7gfqW8r#?secret=GhQIBbecpx\" data-secret=\"GhQIBbecpx\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>Export data from a SQL Server table to a text file in CSV format with an SSIS package. This tutorial explains how to export the SQL Server data into a CSV file with SSIS. The export here is in <a class=\"mh-excerpt-more\" href=\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/\" title=\"Export SQL Server data into a CSV file with SSIS\">&#8230;<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":10674,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[516],"tags":[417],"class_list":{"0":"post-14349","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-ssis","8":"tag-file"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.7 (Yoast SEO v26.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Export SQL Server data into a CSV file with SSIS - SSIS<\/title>\n<meta name=\"description\" content=\"To export SQL Server data into a CSV file with SSIS, use a data flow from the table to the target file and setup the encoding and separators.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Export SQL Server data into a CSV file with SSIS\" \/>\n<meta property=\"og:description\" content=\"To export SQL Server data into a CSV file with SSIS, use a data flow from the table to the target file and setup the encoding and separators.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/\" \/>\n<meta property=\"og:site_name\" content=\"SQL and IT Tutorials\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ExpertOnlyCom\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-09T05:20:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-15T11:16:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/hiking-gear-RFPDJILDFIV_1920x1080.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Expert-Only\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@expert_only\" \/>\n<meta name=\"twitter:site\" content=\"@expert_only\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Expert-Only\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/\"},\"author\":{\"name\":\"Expert-Only\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef\"},\"headline\":\"Export SQL Server data into a CSV file with SSIS\",\"datePublished\":\"2022-09-09T05:20:00+00:00\",\"dateModified\":\"2023-05-15T11:16:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/\"},\"wordCount\":1196,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/expert-only.com\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/hiking-gear-RFPDJILDFIV_1920x1080.jpg\",\"keywords\":[\"File\"],\"articleSection\":[\"SSIS\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/\",\"url\":\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/\",\"name\":\"Export SQL Server data into a CSV file with SSIS - SSIS\",\"isPartOf\":{\"@id\":\"https:\/\/expert-only.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/hiking-gear-RFPDJILDFIV_1920x1080.jpg\",\"datePublished\":\"2022-09-09T05:20:00+00:00\",\"dateModified\":\"2023-05-15T11:16:34+00:00\",\"description\":\"To export SQL Server data into a CSV file with SSIS, use a data flow from the table to the target file and setup the encoding and separators.\",\"breadcrumb\":{\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/#primaryimage\",\"url\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/hiking-gear-RFPDJILDFIV_1920x1080.jpg\",\"contentUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/hiking-gear-RFPDJILDFIV_1920x1080.jpg\",\"width\":1920,\"height\":1080},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"en\",\"item\":\"https:\/\/expert-only.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Export SQL Server data into a CSV file with SSIS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/expert-only.com\/en\/#website\",\"url\":\"https:\/\/expert-only.com\/en\/\",\"name\":\"SQL and IT Tutorials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/expert-only.com\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/expert-only.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/expert-only.com\/en\/#organization\",\"name\":\"Expert-Only\",\"url\":\"https:\/\/expert-only.com\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg\",\"contentUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg\",\"width\":381,\"height\":174,\"caption\":\"Expert-Only\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/ExpertOnlyCom\/\",\"https:\/\/x.com\/expert_only\",\"https:\/\/www.youtube.com\/channel\/UCMS5sR_FwAetB0FmciNvUaA\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef\",\"name\":\"Expert-Only\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g\",\"caption\":\"Expert-Only\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Export SQL Server data into a CSV file with SSIS - SSIS","description":"To export SQL Server data into a CSV file with SSIS, use a data flow from the table to the target file and setup the encoding and separators.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/","og_locale":"en_US","og_type":"article","og_title":"Export SQL Server data into a CSV file with SSIS","og_description":"To export SQL Server data into a CSV file with SSIS, use a data flow from the table to the target file and setup the encoding and separators.","og_url":"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/","og_site_name":"SQL and IT Tutorials","article_publisher":"https:\/\/www.facebook.com\/ExpertOnlyCom\/","article_published_time":"2022-09-09T05:20:00+00:00","article_modified_time":"2023-05-15T11:16:34+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/hiking-gear-RFPDJILDFIV_1920x1080.jpg","type":"image\/jpeg"}],"author":"Expert-Only","twitter_card":"summary_large_image","twitter_creator":"@expert_only","twitter_site":"@expert_only","twitter_misc":{"Written by":"Expert-Only","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/#article","isPartOf":{"@id":"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/"},"author":{"name":"Expert-Only","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef"},"headline":"Export SQL Server data into a CSV file with SSIS","datePublished":"2022-09-09T05:20:00+00:00","dateModified":"2023-05-15T11:16:34+00:00","mainEntityOfPage":{"@id":"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/"},"wordCount":1196,"commentCount":0,"publisher":{"@id":"https:\/\/expert-only.com\/en\/#organization"},"image":{"@id":"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/#primaryimage"},"thumbnailUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/hiking-gear-RFPDJILDFIV_1920x1080.jpg","keywords":["File"],"articleSection":["SSIS"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/","url":"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/","name":"Export SQL Server data into a CSV file with SSIS - SSIS","isPartOf":{"@id":"https:\/\/expert-only.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/#primaryimage"},"image":{"@id":"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/#primaryimage"},"thumbnailUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/hiking-gear-RFPDJILDFIV_1920x1080.jpg","datePublished":"2022-09-09T05:20:00+00:00","dateModified":"2023-05-15T11:16:34+00:00","description":"To export SQL Server data into a CSV file with SSIS, use a data flow from the table to the target file and setup the encoding and separators.","breadcrumb":{"@id":"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/#primaryimage","url":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/hiking-gear-RFPDJILDFIV_1920x1080.jpg","contentUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/hiking-gear-RFPDJILDFIV_1920x1080.jpg","width":1920,"height":1080},{"@type":"BreadcrumbList","@id":"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"en","item":"https:\/\/expert-only.com\/en\/"},{"@type":"ListItem","position":2,"name":"Export SQL Server data into a CSV file with SSIS"}]},{"@type":"WebSite","@id":"https:\/\/expert-only.com\/en\/#website","url":"https:\/\/expert-only.com\/en\/","name":"SQL and IT Tutorials","description":"","publisher":{"@id":"https:\/\/expert-only.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/expert-only.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/expert-only.com\/en\/#organization","name":"Expert-Only","url":"https:\/\/expert-only.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg","contentUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg","width":381,"height":174,"caption":"Expert-Only"},"image":{"@id":"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/ExpertOnlyCom\/","https:\/\/x.com\/expert_only","https:\/\/www.youtube.com\/channel\/UCMS5sR_FwAetB0FmciNvUaA"]},{"@type":"Person","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef","name":"Expert-Only","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g","caption":"Expert-Only"}}]}},"_links":{"self":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/14349","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/comments?post=14349"}],"version-history":[{"count":0,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/14349\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/media\/10674"}],"wp:attachment":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/media?parent=14349"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/categories?post=14349"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/tags?post=14349"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}