SSIS Union All Task

SSIS Union All Task

SSIS Union All

SSIS Union All task used to merge records from multiple source table into one. Union All task is similar to database Union All keyword.

For Example you have two table and you want to merge two tables records into one then follow below steps.

  1. Open SSIS Project.
  2. Inside Data Flow task, Add two or more sources.
  3. Drag and Drop Union All task from data flow Items in to tool box to the data flow designer surface.
  4. Join All the sources with Union All task.
  5. Double click Union All tasks to map different databases sources columns.
  6. Finally Create Data Destination
  7. Connect Union All and Destination.
  8. Completes Destination Settings.
  9. Execute SSIS Package.

You can use below SQL Scripts to create test environment.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
CREATE TABLE Teacher
(
ID INT,
Name VARCHAR(50)
)
GO
INSERT INTO Teacher VALUES(1, 'Ram'),(2,'Ravi')
GO
 
CREATE TABLE Students
(
ID INT,
Name VARCHAR(50),
Age INT
)
GO
INSERT INTO Students VALUES(1, 'Rani',10),(2,'Rakhi',12),(3,'Sohan',13),(4,'Mohan',11)
GO
DROP TABLE SchoolRecords
CREATE TABLE SchoolRecords
(
ID INT,
NAME VARCHAR(50)
)
 
Your Out Muste be equal to
 
SELECT ID, Name FROM Students
UNION ALL
SELECT FROM Teacher <br><br><span style="color: #333333; font-family: calibri, sans-seri
0 Comments
Leave A Comment

Please login to post your valuable comments.

Join the newsletter

Get the latest vLemonn news first

share