Code Snippet |
create table TableA(id int) insert into TableA values(1) insert into TableA values(2) create table TableB(id int) insert into TableB values(3) create table TableC(id int) select * from TableA select * from TableB |
Double clicking Data flow task we will get dataflow task window. Drag the OLEDB Source task.Double click OLEDB Source, you will get OLE DB Source editor. Set the OLE DB connection manager and select the table you want to migrate. Here we will select TableA. Click "Preview" button to check the
data.
Drag another OLEDB Source task.
Double click OLEDB Source task, you will get OLE DB Source editor. Set the OLE DB connection manager (connect to your server) and select the table you want to migrate. Here we will select TableB.Click "Preview" button to check the data.
Drag Union All task and double click this task, you will get Union All Transformation editor. Here you can map the output columns and input columns (You can change the input column as per your business functionality)
Drag OLE DB destination and double click it, you will get an editor.Select the destination database and table. Check the mappings located in the left side of the window. You can opt to keep the null values, identity values, whether you want the check the contraint and you can lock the table during data transfer. Click "Preview" button to check the existing data.
Regards,
Venkatesan Prabu .J