Wednesday 27 May 2015

Load data from multiple tables into single table by using SSIS

Introduction:
              In this article, I will explain How to Load data from multiple tables (6 Tables) into single table by using SSIS.
Solution:
• The solution of the above problem by using Execute SQL Task, Foreach Loop Container, Script Task and Data Flow Task as follows.

• First you create three variables with default values (Scope-Package level).


• Using Execute SQL Task to get the table names from database and stored that information into variable [@Tablenames].


• Foreach Loop Container is used to get single table name at a time and stored into variable [@Sourcename].


• Script Task is used to create the Query and stored into variable [@ConnectionQuery].

• By using Dataflow Task to get data from Database and stored into Destination table.


Note: The Source 6 tables and Destination table contains same structure.


Let me know what you think about this article. 

No comments:

Post a Comment