{"id":12999,"date":"2023-07-04T05:34:00","date_gmt":"2023-07-04T03:34:00","guid":{"rendered":"https:\/\/expert-only.com\/?p=12999"},"modified":"2026-05-18T17:21:06","modified_gmt":"2026-05-18T15:21:06","slug":"import-multiple-text-files-with-ssis","status":"publish","type":"post","link":"https:\/\/expert-only.com\/en\/ssis\/import-multiple-text-files-with-ssis\/","title":{"rendered":"Import Multiple Text Files in SQL Server with SSIS in 6 Easy Steps"},"content":{"rendered":"\n<p class=\"has-text-align-center\" id=\"h-import-multiple-text-files-csv-or-txt-into-a-sql-server-table-using-an-ssis-package-and-a-dynamic-loop-called-the-for-each-loop\"><strong><em>How to import multiple text files in SQL Server with SSIS ? Format can be csv or txt, to import into a table using a simple SSIS package and a loop.<\/em><\/strong><\/p>\n\n\n\n<p>This tutorial explains how to import multiple text files into SQL Server with SSIS using a single package and a dynamic loop to detect flat files. To start with, all text files (.txt, .csv, etc\u2026) must be in the same folder.<\/p>\n\n\n\n<p>This automatic integration uses dynamic variables and allows to integrate many files with the same structure at the same time. To load several flat files dynamically, use an SSIS loop, i.e. the SSIS <em>Foreach Loop Container<\/em> component.<\/p>\n\n\n\n<p>This package uses the same components as the previous <a href=\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/\"><strong>SSIS tutorial to import a single flat file into a SQL table<\/strong><\/a>. It is therefore the same data flow used, but this time with variables in the dynamic file path.<\/p>\n\n\n\n<p>Also to emphasize the power of integration tools, do not forget that once you develop your package, you will be able to load 2 files as well as 1000 files in the same loop.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 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\/import-multiple-text-files-with-ssis\/#step-1-material-and-sql-script-to-import-multiple-text-files-in-sql-server-with-ssis-premium-content\" >Step 1: Material and SQL Script to import Multiple Text Files in SQL Server with SSIS (Premium content)<\/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\/import-multiple-text-files-with-ssis\/#step-2-create-the-file-loop-and-the-ssis-data-flow\" >Step 2: Create the file loop and the SSIS data flow<\/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\/import-multiple-text-files-with-ssis\/#step-3-create-the-ssis-dynamic-variable-to-store-the-file-path\" >Step 3: Create the SSIS dynamic variable to store the file path<\/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\/import-multiple-text-files-with-ssis\/#step-4-configure-the-ssis-foreach-file-loop-container\" >Step 4: Configure the SSIS Foreach File Loop container<\/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\/import-multiple-text-files-with-ssis\/#step-5-add-the-file-name-to-import-using-ssis-derived-column\" >Step 5: Add the file name to import using SSIS derived column<\/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\/import-multiple-text-files-with-ssis\/#step-6-run-the-package-to-import-multiple-text-files-in-sql-server-with-ssis-and-check-data-in-ssms\" >Step 6. Run the package to Import Multiple Text Files in SQL Server with SSIS and check data in SSMS<\/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\/import-multiple-text-files-with-ssis\/#conclusion-on-multiple-text-files-import-with-ssis\" >Conclusion on multiple text files import with SSIS<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"step-1-material-and-sql-script-to-import-multiple-text-files-in-sql-server-with-ssis-premium-content\"><\/span>Step 1: Material and SQL Script to import Multiple Text Files in SQL Server with SSIS (Premium content)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"has-text-align-center\"><strong>First, to access our resources, to support us and much more, subscribe to our SSIS Full training available on Udemy<\/strong>.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong><a href=\"https:\/\/www.udemy.com\/course\/data-integration-with-ssis-sql-server-integration-services\/?referralCode=00C42EE09B35CC84BF93\" data-type=\"link\" data-id=\"https:\/\/www.udemy.com\/course\/data-integration-with-ssis-sql-server-integration-services\/?referralCode=00C42EE09B35CC84BF93\" target=\"_blank\" rel=\"noopener\">Data integration with SSIS &#8211; with SSAS and Power BI bonus<\/a><\/strong><\/p>\n\n\n\n<div class=\"wp-block-uagb-buttons uagb-buttons__outer-wrap uagb-block-bb3f1488\">\n  <a href=\"https:\/\/www.udemy.com\/course\/data-integration-with-ssis-sql-server-integration-services\/?couponCode=EO-SSIS-24-BEA561FDF\" rel=\"noopener noreferrer\" target=\"_blank\" aria-label=\"Enrol for the Full SSIS training on Udemy\" style=\"display:block;max-width:740px;margin:1.5em auto;text-decoration:none;text-align:center;\">\n    <img src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2023\/06\/ssis-course-image_422_text.jpg\"\n         alt=\"SSIS Full Training course preview\"\n         width=\"740\"\n         height=\"422\"\n         loading=\"lazy\"\n         decoding=\"async\"\n         style=\"display:block;width:100%;height:auto;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,0.12);\">\n  <\/a>\n<\/div>\n\n\n\n<p>The files are stored like this:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>C:\\data<\/strong>, contains these CSV files:\n<ul class=\"wp-block-list\">\n<li>Customers_Data_1.csv<\/li>\n\n\n\n<li>Customers_Data_2.csv<\/li>\n\n\n\n<li>Customers_Data_3.csv<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p><strong>Then create the destination table. <\/strong>The table uses the same structure as the tutorial for loading a flat file and fills a column with the full path to the source file.<\/p>\n\n\n\n<p><strong>Then, to access target table creation code, enroll in our SSIS Full training available on Udemy<\/strong>.<\/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=\"\">\/* \n\nThen, to access target table creation code, enrol in our SSIS Full training available on Udemy.\n\n*\/ <\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"step-2-create-the-file-loop-and-the-ssis-data-flow\"><\/span>Step 2: Create the file loop and the SSIS data flow<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>First, use a loop from the control flow tab. Then select the dynamic Foreach Loop Container and drag it onto the workspace.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"840\" height=\"580\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-1-for-each-file-container.jpg\" alt=\"To Import Multiple Text Files in SQL Server with SSIS use a Foreach Loop container and a Data flow task\" class=\"wp-image-11920\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-1-for-each-file-container.jpg 840w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-1-for-each-file-container-300x207.jpg 300w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-1-for-each-file-container-768x530.jpg 768w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><figcaption class=\"wp-element-caption\"><strong><em>To Import Multiple Text Files in SQL Server with SSIS use a Foreach Loop container and a Data flow task<\/em><\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"step-3-create-the-ssis-dynamic-variable-to-store-the-file-path\"><\/span>Step 3: Create the SSIS dynamic variable to store the file path<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Create a variable named <em>FlatFilePath<\/em> of type String at the package level. To display the variables, click on the package and press <strong>F4<\/strong> or <strong>right-click in the data flow area<\/strong>. Here the variable is called <strong><em>FlatFilePath<\/em><\/strong> and the Data Type is <em><strong>String<\/strong><\/em>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"884\" height=\"290\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-2-create-path-variable.jpg\" alt=\"Create the FlatFilePath SSIS variable to store text file names dynamically\" class=\"wp-image-11925\" style=\"width:884px;height:290px\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-2-create-path-variable.jpg 884w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-2-create-path-variable-300x98.jpg 300w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-2-create-path-variable-768x252.jpg 768w\" sizes=\"auto, (max-width: 884px) 100vw, 884px\" \/><figcaption class=\"wp-element-caption\"><em><strong>Create the FlatFilePath SSIS variable to store text file names dynamically<\/strong><\/em><\/figcaption><\/figure>\n<\/div>\n\n\n<p>Set up the flat file connection as detailed in this tutorial with a data flow to load a flat file. It is the same principle but this time the dataflow allows to load several text files with a single SSIS package. Then modify the <strong><em>ConnectionString<\/em><\/strong> expression to use the dynamic variable instead of the hard path.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"704\" height=\"847\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-3-connection-variables.jpg\" alt=\"Modify the properties of the connection to the text file to import in the SSIS loop\" class=\"wp-image-11929\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-3-connection-variables.jpg 704w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-3-connection-variables-249x300.jpg 249w\" sizes=\"auto, (max-width: 704px) 100vw, 704px\" \/><figcaption class=\"wp-element-caption\"><strong><em>Modify the properties of the connection to the flat file<\/em><\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p>Use the variable created before so that at each passage in the loop, the file name is dynamic.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"647\" height=\"529\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-4-map-connectionstring.jpg\" alt=\"Map the FlatFilePath SSIS variable to the ConnectionString property in the text files properties\" class=\"wp-image-11933\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-4-map-connectionstring.jpg 647w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-4-map-connectionstring-300x245.jpg 300w\" sizes=\"auto, (max-width: 647px) 100vw, 647px\" \/><figcaption class=\"wp-element-caption\"><strong><em>Map the FlatFilePath variable to the ConnectionString property<\/em><\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"step-4-configure-the-ssis-foreach-file-loop-container\"><\/span>Step 4: Configure the SSIS Foreach File Loop container<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Then double-click on the Foreach Loop Container sequence. In the Collection tab :<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Choose the folder where the flat files are located: <strong><em>C:\\Data<\/em><\/strong><\/li>\n\n\n\n<li>Then specify the name of the flat files to be loaded with SSIS: <strong><em>Customers_Data*.csv<\/em><\/strong><\/li>\n\n\n\n<li>Choose the full name of the file with the path: <strong><em>Fully qualified<\/em><\/strong><\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"981\" height=\"840\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-5-configure-csv-file-loop.jpg\" alt=\"Set the folder and filter to select the text files to be used in the SSIS loop\" class=\"wp-image-11939\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-5-configure-csv-file-loop.jpg 981w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-5-configure-csv-file-loop-300x257.jpg 300w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-5-configure-csv-file-loop-768x658.jpg 768w\" sizes=\"auto, (max-width: 981px) 100vw, 981px\" \/><figcaption class=\"wp-element-caption\"><strong><em>Set the folder and filter to select the text files to be used in the SSIS loop<\/em><\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p>Then, in the <em>Variable Mappings<\/em> tab, link the <em>FlatFilePath<\/em> variable to index 0. This link dynamically transmits the name of the current file to the variable and therefore to the file connection.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"877\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-6-foreach-map-variable-1024x877.jpg\" alt=\"Bind the SSIS variable dynamically to the current file name\" class=\"wp-image-11947\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-6-foreach-map-variable-1024x877.jpg 1024w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-6-foreach-map-variable-300x257.jpg 300w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-6-foreach-map-variable-768x658.jpg 768w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-6-foreach-map-variable.jpg 1081w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong><em>Bind the SSIS variable dynamically to the current file name<\/em><\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"step-5-add-the-file-name-to-import-using-ssis-derived-column\"><\/span>Step 5: Add the file name to import using SSIS derived column<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Edit the derived column component and add the following two derived columns for:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Add the Customer ID in integer format<\/li>\n\n\n\n<li>Add the source file name from the dynamic variable<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"960\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-7-map-filename-derived-column-1024x960.jpg\" alt=\"Add the CustomerID and the Filename as derived columns\" class=\"wp-image-11953\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-7-map-filename-derived-column-1024x960.jpg 1024w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-7-map-filename-derived-column-300x281.jpg 300w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-7-map-filename-derived-column-768x720.jpg 768w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-7-map-filename-derived-column.jpg 1122w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Add the CustomerID and the Filename as derived columns<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"step-6-run-the-package-to-import-multiple-text-files-in-sql-server-with-ssis-and-check-data-in-ssms\"><\/span>Step 6. Run the package to Import Multiple Text Files in SQL Server with SSIS and check data in SSMS<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Now start the loading. I.e the actual process to import multiple text files in sql server with SSIS.<\/p>\n\n\n\n<p>The DTSX package loads the flat files into the database one by one. It means that the same data flow is executed one time per file detected in the source folder. In this case, 3 iterations occur, one per file.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"480\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-10-execute-foreach_container.jpg\" alt=\"Execute the SSIS loop to import multiple text files in SQL Server with SSIS and add the filename\" class=\"wp-image-11964\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-10-execute-foreach_container.jpg 700w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-10-execute-foreach_container-300x206.jpg 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><figcaption class=\"wp-element-caption\"><em><strong>Execute the SSIS loop to import multiple text files in SQL Server with SSIS<\/strong><\/em><\/figcaption><\/figure>\n<\/div>\n\n\n<p>Clicking in the data flow, we notice that 16 lines are integrated in each iteration.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"720\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-11-execute-data-flow.jpg\" alt=\"Lines imported with the Integration Services data flow\" class=\"wp-image-11968\" style=\"width:700px;height:720px\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-11-execute-data-flow.jpg 700w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-11-execute-data-flow-292x300.jpg 292w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><figcaption class=\"wp-element-caption\"><em><strong>Note the number of lines imported with the Integration Services data flow<\/strong><\/em><\/figcaption><\/figure>\n<\/div>\n\n\n<p>Finally, check the results with the 2 following SQL queries. The result is consistent with 16 rows embedded for each source file, with no errors.<\/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 [Filename], COUNT(*)\n  FROM [dbo].[Customers_with_filename]\n  GROUP BY [Filename]; \n\nSELECT * \n  FROM [dbo].[Customers_with_filename];<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"771\" height=\"889\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-12-check-results-ssms.jpg\" alt=\"Check import of multiple text files in SQL Server with SSIS by running an SQL query in SSMS \" class=\"wp-image-11972\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-12-check-results-ssms.jpg 771w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-12-check-results-ssms-260x300.jpg 260w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-load-multiple-text-files-12-check-results-ssms-768x886.jpg 768w\" sizes=\"auto, (max-width: 771px) 100vw, 771px\" \/><figcaption class=\"wp-element-caption\"><strong><em>Check import of multiple text files in SQL Server with SSIS by running an SQL query in SSMS <\/em><\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"conclusion-on-multiple-text-files-import-with-ssis\"><\/span>Conclusion on multiple text files import with SSIS<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>So to conclude on how to import multiple text files in SQL Server with SSIS in 6 easy steps, let me  remind an important thing. To avoid errors when importing of multiple text files into a SQL Server table with SSIS, check the <a href=\"https:\/\/www.w3.org\/International\/questions\/qa-what-is-encoding\" target=\"_blank\" rel=\"noreferrer noopener\">encoding<\/a> of the files to process.<\/p>\n\n\n\n<p>The <strong>encoding <\/strong>diferrence is definitely a classical SSIS and more widely, an integration error. Also, the <strong>mapping <\/strong>of the variable is mandatory to make the package dynamic and avoid manual development.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">More on data import and export with SSIS<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/expert-only.com\/en\/ssis\/create-a-simple-ssis-data-flow\/\">Create a basic data flow with SSIS<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/expert-only.com\/en\/ssis\/create-a-connection-to-sql-server-database-in-ssis\/\">Create a connection to a SQL Server database in SSIS<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/expert-only.com\/en\/ssis\/import-text-file-into-sql-server-database-with-ssis\/\">Import an text file into a SQL database with SSIS<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/expert-only.com\/en\/ssis\/import-excel-file-into-sql-table-with-ssis\/\">Create a package to import Excel data into SQL Server<\/a><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-embed aligncenter is-type-wp-embed is-provider-sql-server-and-data-tutorials wp-block-embed-sql-server-and-data-tutorials\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"JoRQr2f0XQ\"><a href=\"https:\/\/expert-only.com\/en\/ssis-online-training\/\">SQL Server Integration Services Course (SSIS)<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;SQL Server Integration Services Course (SSIS)&#8221; &#8212; SQL Server and Data Tutorials\" src=\"https:\/\/expert-only.com\/en\/ssis-online-training\/embed\/#?secret=Bp4mQNom6M#?secret=JoRQr2f0XQ\" data-secret=\"JoRQr2f0XQ\" 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>How to import multiple text files in SQL Server with SSIS ? Format can be csv or txt, to import into a table using a simple SSIS package and a loop. This tutorial explains how to import multiple text <a class=\"mh-excerpt-more\" href=\"https:\/\/expert-only.com\/en\/ssis\/import-multiple-text-files-with-ssis\/\" title=\"Import Multiple Text Files in SQL Server with SSIS in 6 Easy Steps\">&#8230;<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":10709,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[516],"tags":[417],"class_list":{"0":"post-12999","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-ssis","8":"tag-file"},"_links":{"self":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/12999","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=12999"}],"version-history":[{"count":24,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/12999\/revisions"}],"predecessor-version":[{"id":31295,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/12999\/revisions\/31295"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/media\/10709"}],"wp:attachment":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/media?parent=12999"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/categories?post=12999"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/tags?post=12999"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}